pub struct InputDialogState {
pub input: String,
pub cursor: usize,
pub prompt: String,
pub confirmed: bool,
pub cancelled: bool,
}Expand description
State for the text-input dialog used to enter a save-folder path.
Fields§
§input: String§cursor: usize§prompt: String§confirmed: bool§cancelled: boolImplementations§
Source§impl InputDialogState
impl InputDialogState
pub fn new(prompt: impl Into<String>) -> Self
pub fn reset(&mut self)
Sourcepub fn insert_str(&mut self, s: &str)
pub fn insert_str(&mut self, s: &str)
Insert a string at the cursor position (for paste).
Sourcepub fn cursor_left(&mut self)
pub fn cursor_left(&mut self)
Move cursor left by one grapheme boundary.
Sourcepub fn cursor_right(&mut self)
pub fn cursor_right(&mut self)
Move cursor right by one grapheme boundary.
Auto Trait Implementations§
impl Freeze for InputDialogState
impl RefUnwindSafe for InputDialogState
impl Send for InputDialogState
impl Sync for InputDialogState
impl Unpin for InputDialogState
impl UnsafeUnpin for InputDialogState
impl UnwindSafe for InputDialogState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more