pub struct TextInputState {
pub focused: bool,
pub content: String,
pub cursor_position: usize,
pub selection_start: Option<usize>,
pub selection_end: Option<usize>,
}Expand description
State for TextInput component
Fields§
§focused: boolWhether the input is currently focused
content: StringThe current input content
cursor_position: usizeCurrent cursor position (in characters, not bytes)
selection_start: Option<usize>Start of selection (None if no selection)
selection_end: Option<usize>End of selection (None if no selection)
Trait Implementations§
Source§impl Clone for TextInputState
impl Clone for TextInputState
Source§fn clone(&self) -> TextInputState
fn clone(&self) -> TextInputState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextInputState
impl Debug for TextInputState
Source§impl Default for TextInputState
impl Default for TextInputState
Source§fn default() -> TextInputState
fn default() -> TextInputState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextInputState
impl RefUnwindSafe for TextInputState
impl Send for TextInputState
impl Sync for TextInputState
impl Unpin for TextInputState
impl UnsafeUnpin for TextInputState
impl UnwindSafe for TextInputState
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