pub struct CursorOwning<A: Adapter>{ /* private fields */ }Expand description
A cursor with ownership over the RBTree it points into.
Implementations§
Source§impl<A: Adapter> CursorOwning<A>
impl<A: Adapter> CursorOwning<A>
Sourcepub fn into_inner(self) -> RBTree<A>
pub fn into_inner(self) -> RBTree<A>
Consumes self and returns the inner RBTree.
Sourcepub fn as_cursor(&self) -> Cursor<'_, A>
pub fn as_cursor(&self) -> Cursor<'_, A>
Returns a read-only cursor pointing to the current element.
The lifetime of the returned Cursor is bound to that of the
CursorOwning, which means it cannot outlive the CursorOwning and that the
CursorOwning is frozen for the lifetime of the Cursor.
Mutations of the returned cursor are not reflected in the original.
Sourcepub fn with_cursor_mut<T>(
&mut self,
f: impl FnOnce(&mut CursorMut<'_, A>) -> T,
) -> T
pub fn with_cursor_mut<T>( &mut self, f: impl FnOnce(&mut CursorMut<'_, A>) -> T, ) -> T
Perform action with mutable reference to the cursor.
All mutations of the cursor are reflected in the original.