pub struct CursorMut<'a, T> { /* private fields */ }Implementations§
Source§impl<'a, T> CursorMut<'a, T>
impl<'a, T> CursorMut<'a, T>
Sourcepub fn into_selection(self) -> SelectionMut<'a, T>
pub fn into_selection(self) -> SelectionMut<'a, T>
Converts into an empty selection at the cursor’s position.
Sourcepub fn move_prev(&mut self) -> bool
pub fn move_prev(&mut self) -> bool
Moves back one element.
Returns false, without moving, if already at the start.
Sourcepub fn move_next(&mut self) -> bool
pub fn move_next(&mut self) -> bool
Moves forward one element.
Returns false, without moving, if already at the end.
Sourcepub fn peek_before(&self) -> Option<&T>
pub fn peek_before(&self) -> Option<&T>
Returns the element just before the cursor.
Sourcepub fn peek_after(&self) -> Option<&T>
pub fn peek_after(&self) -> Option<&T>
Returns the element just after the cursor.
pub fn peek_before_mut(&mut self) -> Option<&mut T>
pub fn peek_after_mut(&mut self) -> Option<&mut T>
Sourcepub fn insert_before(&mut self, value: T)
pub fn insert_before(&mut self, value: T)
Inserts an element just before the cursor.
Sourcepub fn insert_after(&mut self, value: T)
pub fn insert_after(&mut self, value: T)
Inserts an element just after the cursor.
Sourcepub fn remove_before(&mut self) -> Option<T>
pub fn remove_before(&mut self) -> Option<T>
Removes and returns the element just before the cursor.
Sourcepub fn remove_after(&mut self) -> Option<T>
pub fn remove_after(&mut self) -> Option<T>
Removes and returns the element just after the cursor.
Sourcepub fn splice_before(&mut self, other: LinkedList<T>)
pub fn splice_before(&mut self, other: LinkedList<T>)
Inserts all elements of other just before the cursor.
Sourcepub fn splice_after(&mut self, other: LinkedList<T>)
pub fn splice_after(&mut self, other: LinkedList<T>)
Inserts all elements of other just after the cursor.
Sourcepub fn split_before(&mut self) -> LinkedList<T>
pub fn split_before(&mut self) -> LinkedList<T>
Splits off and returns all elements before the cursor.
Sourcepub fn split_after(&mut self) -> LinkedList<T>
pub fn split_after(&mut self) -> LinkedList<T>
Splits off and returns all elements after the cursor.
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for CursorMut<'a, T>
impl<'a, T> Freeze for CursorMut<'a, T>where
&'a mut LinkedList<T>: Freeze,
impl<'a, T> RefUnwindSafe for CursorMut<'a, T>where
&'a mut LinkedList<T>: RefUnwindSafe,
impl<'a, T> Send for CursorMut<'a, T>where
&'a mut LinkedList<T>: Send,
impl<'a, T> Sync for CursorMut<'a, T>where
&'a mut LinkedList<T>: Sync,
impl<'a, T> Unpin for CursorMut<'a, T>where
&'a mut LinkedList<T>: Unpin,
impl<'a, T> UnsafeUnpin for CursorMut<'a, T>where
&'a mut LinkedList<T>: UnsafeUnpin,
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