Struct ixlist::Cursor
[−]
[src]
pub struct Cursor<'a, T: 'a> { /* fields omitted */ }
A cursor points to a location in a list, and you can step the cursor forward and backward.
Methods
impl<'a, T: 'a> Cursor<'a, T>
[src]
fn next(&mut self) -> Option<&mut T>
[src]
Step the cursor forward.
Returns None after the last element. After that, another call to .next() returns the first element of the list.
fn prev(&mut self) -> Option<&mut T>
[src]
Step the cursor backward.
Returns None when positioned before the first element. After that, another call to .prev() returns the last element of the list.
fn insert(&mut self, value: T)
[src]
Insert an element at the current position, e.g. before the element that would be returned by .next() in this position.