Struct linked_vector::Cursor
source · pub struct Cursor<'a, T> { /* private fields */ }
Expand description
A cursor which can only read the elements of the list.
Trait Implementations§
source§impl<'a, T> CursorBase<T> for Cursor<'a, T>
impl<'a, T> CursorBase<T> for Cursor<'a, T>
source§fn get(&self) -> Option<&T>
fn get(&self) -> Option<&T>
Returns a reference to the element at the cursor’s current position.
source§fn get_mut(&mut self) -> Option<&mut T>
fn get_mut(&mut self) -> Option<&mut T>
Returns a mutable reference to the element at the cursor’s current
position.
source§fn move_to(&mut self, handle: HNode) -> bool
fn move_to(&mut self, handle: HNode) -> bool
Moves the cursor to the specified handle. Returns true if the cursor
was moved, false if the handle was invalid.
source§fn move_next(&mut self) -> Option<HNode>
fn move_next(&mut self) -> Option<HNode>
Moves the cursor to the next element. Returns the handle of the next
element if the cursor was moved, None if the cursor was already at the
end of the list.
source§fn move_prev(&mut self) -> Option<HNode>
fn move_prev(&mut self) -> Option<HNode>
Moves the cursor to the previous element. Returns the handle of the
previous element if the cursor was moved, None if the cursor was
already at the start of the list.
source§fn move_to_start(&mut self) -> Option<HNode>
fn move_to_start(&mut self) -> Option<HNode>
Moves the cursor to the start of the list. Returns the handle of the
first element if the cursor was moved, None if the list is empty.
source§fn move_to_end(&mut self) -> Option<HNode>
fn move_to_end(&mut self) -> Option<HNode>
Moves the cursor to the end of the list. Returns the handle of the
last element if the cursor was moved, None if the list is empty.