pub struct CursorState { /* private fields */ }Implementations§
Source§impl CursorState
impl CursorState
pub fn new() -> Self
pub fn get_position(&self) -> usize
pub fn is_visible(&self) -> bool
pub fn update_blink(&mut self)
pub fn show_cursor(&mut self)
pub fn update_text_length(&mut self, text: &str)
pub fn move_left(&mut self)
pub fn move_right(&mut self)
pub fn move_to_start(&mut self)
pub fn move_to_end(&mut self)
pub fn get_next_byte_position(&self, text: &str) -> usize
pub fn get_byte_position(&self, text: &str) -> usize
pub fn get_prev_byte_position(&self, text: &str) -> usize
pub fn reset_for_empty_text(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CursorState
impl RefUnwindSafe for CursorState
impl Send for CursorState
impl Sync for CursorState
impl Unpin for CursorState
impl UnwindSafe for CursorState
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