pub struct Cursor<T: TextBuffer> { /* private fields */ }Implementations§
Source§impl<T: TextBuffer> Cursor<T>
impl<T: TextBuffer> Cursor<T>
pub fn new() -> Self
pub fn position(&self) -> usize
pub fn move_left(&mut self, offset: usize) -> usize
pub fn move_right(&mut self, offset: usize, len: usize) -> usize
pub fn home(&mut self)
pub fn end(&mut self, len: usize)
pub fn backspace(&mut self, buffer: &mut impl TextBuffer)
pub fn delete(&self, buffer: &mut impl TextBuffer)
pub fn move_to_next_word_end(&mut self, buffer: &impl TextBuffer)
pub fn move_to_prev_word_start(&mut self, buffer: &impl TextBuffer)
pub fn delete_prev_word(&mut self, buffer: &mut impl TextBuffer)
pub fn delete_next_word(&mut self, buffer: &mut impl TextBuffer)
pub fn delete_to_line_start(&mut self, buffer: &mut impl TextBuffer)
pub fn delete_to_line_end(&self, buffer: &mut impl TextBuffer)
Auto Trait Implementations§
impl<T> Freeze for Cursor<T>
impl<T> RefUnwindSafe for Cursor<T>where
T: RefUnwindSafe,
impl<T> Send for Cursor<T>where
T: Send,
impl<T> Sync for Cursor<T>where
T: Sync,
impl<T> Unpin for Cursor<T>where
T: Unpin,
impl<T> UnsafeUnpin for Cursor<T>
impl<T> UnwindSafe for Cursor<T>where
T: UnwindSafe,
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