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: &HashMap<PageId, Page>,
root: PageId,
key: &[u8],
) -> Result<Self>
pub fn seek( pages: &HashMap<PageId, Page>, 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: &HashMap<PageId, Page>, root: PageId) -> Result<Self>
pub fn first(pages: &HashMap<PageId, Page>, root: PageId) -> Result<Self>
Position the cursor at the first entry in the tree.
Sourcepub fn last(pages: &HashMap<PageId, Page>, root: PageId) -> Result<Self>
pub fn last(pages: &HashMap<PageId, Page>, root: PageId) -> Result<Self>
Position the cursor at the last entry in the tree.
Sourcepub fn current(&self, pages: &HashMap<PageId, Page>) -> Option<CursorEntry>
pub fn current(&self, pages: &HashMap<PageId, Page>) -> Option<CursorEntry>
Get the current entry without advancing.
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