Skip to main content

CursorMut

Struct CursorMut 

Source
pub struct CursorMut<'a, T> { /* private fields */ }

Implementations§

Source§

impl<'a, T> CursorMut<'a, T>

Source

pub fn into_selection(self) -> SelectionMut<'a, T>

Converts into an empty selection at the cursor’s position.

Source

pub fn move_prev(&mut self) -> bool

Moves back one element.

Returns false, without moving, if already at the start.

Source

pub fn move_next(&mut self) -> bool

Moves forward one element.

Returns false, without moving, if already at the end.

Source

pub fn peek_before(&self) -> Option<&T>

Returns the element just before the cursor.

Source

pub fn peek_after(&self) -> Option<&T>

Returns the element just after the cursor.

Source

pub fn peek_before_mut(&mut self) -> Option<&mut T>

Source

pub fn peek_after_mut(&mut self) -> Option<&mut T>

Source

pub fn insert_before(&mut self, value: T)

Inserts an element just before the cursor.

Source

pub fn insert_after(&mut self, value: T)

Inserts an element just after the cursor.

Source

pub fn remove_before(&mut self) -> Option<T>

Removes and returns the element just before the cursor.

Source

pub fn remove_after(&mut self) -> Option<T>

Removes and returns the element just after the cursor.

Source

pub fn splice_before(&mut self, other: LinkedList<T>)

Inserts all elements of other just before the cursor.

Source

pub fn splice_after(&mut self, other: LinkedList<T>)

Inserts all elements of other just after the cursor.

Source

pub fn split_before(&mut self) -> LinkedList<T>

Splits off and returns all elements before the cursor.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.