pub struct Cursor { /* private fields */ }Implementations§
Source§impl Cursor
impl Cursor
pub fn move_left(&mut self, amount: usize)
pub fn move_down(&mut self, amount: usize)
pub fn move_up(&mut self, amount: usize)
pub fn move_right(&mut self, amount: usize)
pub fn move_to_newline_start(&mut self)
pub fn move_to_line_start(&mut self)
pub fn move_to_line_end(&mut self, line_len: usize)
pub fn move_to_col(&mut self, col: usize)
pub fn move_to_row(&mut self, row: usize)
pub fn row(&self) -> usize
pub fn col(&self) -> usize
pub fn row_with_offset(&self) -> usize
pub fn col_with_offset(&self) -> usize
pub fn set_col_offset(&mut self, offset: usize)
pub fn set_row_offset(&mut self, offset: usize)
pub fn readable_position(&self) -> (usize, usize)
pub fn maybe_snap_to_col(&mut self, line_len: usize)
Trait Implementations§
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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