pub struct TextField { /* private fields */ }Implementations§
Source§impl TextField
impl TextField
pub fn new(initial: &str) -> Self
pub fn text(&self) -> &str
pub fn visual_cursor_pos(&self) -> usize
pub fn move_cursor_left(&mut self)
pub fn move_cursor_start(&mut self)
pub fn move_cursor_right(&mut self)
pub fn move_cursor_end(&mut self)
pub fn enter_char(&mut self, new_char: char)
pub fn delete_char(&mut self)
pub fn delete_char_forward(&mut self)
pub fn move_cursor_back_word(&mut self)
pub fn delete_word_backward(&mut self)
pub fn move_cursor_forward_word(&mut self)
pub fn delete_word_forward(&mut self)
pub fn clear(&mut self)
pub fn set_text(&mut self, text: &str)
pub fn insert_text(&mut self, text: &str)
pub fn cursor_idx(&self) -> usize
pub fn set_cursor_idx(&mut self, idx: usize)
pub fn delete_to_start(&mut self)
pub fn set_error(&mut self, short: String, long: String)
pub fn clear_error(&mut self)
Trait Implementations§
impl Eq for TextField
impl StructuralPartialEq for TextField
Auto Trait Implementations§
impl Freeze for TextField
impl RefUnwindSafe for TextField
impl Send for TextField
impl Sync for TextField
impl Unpin for TextField
impl UnsafeUnpin for TextField
impl UnwindSafe for TextField
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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