pub struct Value { /* private fields */ }Expand description
The value of a TextInput.
Implementations§
Source§impl Value
impl Value
Sourcepub fn previous_start_of_word(&self, index: usize) -> usize
pub fn previous_start_of_word(&self, index: usize) -> usize
Returns the position of the previous start of a word from the given
grapheme index.
Sourcepub fn next_end_of_word(&self, index: usize) -> usize
pub fn next_end_of_word(&self, index: usize) -> usize
Returns the position of the next end of a word from the given grapheme
index.
Sourcepub fn select(&self, start: usize, end: usize) -> Self
pub fn select(&self, start: usize, end: usize) -> Self
Returns a new Value containing the graphemes from start until the
given end.
Sourcepub fn until(&self, index: usize) -> Self
pub fn until(&self, index: usize) -> Self
Returns a new Value containing the graphemes until the given
index.
Sourcepub fn insert(&mut self, index: usize, c: char)
pub fn insert(&mut self, index: usize, c: char)
Inserts a new char at the given grapheme index.
Sourcepub fn insert_many(&mut self, index: usize, value: Value)
pub fn insert_many(&mut self, index: usize, value: Value)
Inserts a bunch of graphemes at the given grapheme index.
Sourcepub fn remove_many(&mut self, start: usize, end: usize)
pub fn remove_many(&mut self, start: usize, end: usize)
Removes the graphemes from start to end.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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