Struct intrusive_collections::rbtree::Cursor
source · Expand description
A cursor which provides read-only access to a RBTree
.
Implementations
sourceimpl<'a, A: Adapter<Link = Link> + 'a> Cursor<'a, A>
impl<'a, A: Adapter<Link = Link> + 'a> Cursor<'a, A>
sourcepub fn get(&self) -> Option<&'a A::Value>
pub fn get(&self) -> Option<&'a A::Value>
Returns a reference to the object that the cursor is currently pointing to.
This returns None if the cursor is currently pointing to the null object.
sourcepub fn move_next(&mut self)
pub fn move_next(&mut self)
Moves the cursor to the next element of the RBTree
.
If the cursor is pointer to the null object then this will move it to
the first element of the RBTree
. If it is pointing to the last
element of the RBTree
then this will move it to the null object.
sourcepub fn move_prev(&mut self)
pub fn move_prev(&mut self)
Moves the cursor to the previous element of the RBTree
.
If the cursor is pointer to the null object then this will move it to
the last element of the RBTree
. If it is pointing to the first
element of the RBTree
then this will move it to the null object.
Trait Implementations
Auto Trait Implementations
impl<'a, A> !RefUnwindSafe for Cursor<'a, A>
impl<'a, A> !Send for Cursor<'a, A>
impl<'a, A> !Sync for Cursor<'a, A>
impl<'a, A> Unpin for Cursor<'a, A>
impl<'a, A> !UnwindSafe for Cursor<'a, A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more