pub struct Cursor { /* private fields */ }Expand description
Cursor position within the B+ tree. Stores the path from root to the current leaf.
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn seek(pages: &impl PageMap, root: PageId, key: &[u8]) -> Result<Self>
pub fn seek(pages: &impl PageMap, root: PageId, key: &[u8]) -> Result<Self>
Position the cursor at the first key >= key (seek).
If key is empty, positions at the first entry in the tree.
Sourcepub fn first(pages: &impl PageMap, root: PageId) -> Result<Self>
pub fn first(pages: &impl PageMap, root: PageId) -> Result<Self>
Position the cursor at the first entry in the tree.
Sourcepub fn last(pages: &impl PageMap, root: PageId) -> Result<Self>
pub fn last(pages: &impl PageMap, root: PageId) -> Result<Self>
Position the cursor at the last entry in the tree.
pub fn current(&self, pages: &impl PageMap) -> Option<CursorEntry>
pub fn current_ref<'a, P: PageMap>(&self, pages: &'a P) -> Option<LeafCell<'a>>
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more