Struct sanakirja::btree::page::Page [−][src]
pub struct Page<K, V> { /* fields omitted */ }
Expand description
Empty type implementing BTreePage
and BTreeMutPage
.
Trait Implementations
Save a leaf entry as a replacement, when we delete at an internal node. This can be a pointer to the leaf if the leaf isn’t mutated, or the actual value, or something else. Read more
Recover the saved value.
Add an entry to the page, possibly splitting the page in the process. Read more
Add an entry to page
, at position c
. Does not check
whether there is enough space to do so. This method is mostly
useful for cloning pages. Read more
pub unsafe fn set_left_child(
page: &mut MutPage,
c: &<Page<K, V> as BTreePage<K, V>>::Cursor,
l: u64
)
[src]Update the left child of the position pointed to by the cursor. Read more
Delete an entry on the page, returning the resuting page along
with the offset of the freed page (or 0 if no page was freed,
i.e. if page
is mutable). Read more
type Cursor = PageCursor
Whether this cursor is at the end of the page.
Whether this cursor is strictly before the first element.
Returns a cursor set before the first element of the page (i.e. set to -1). Read more
Returns a cursor set after the last element of the page (i.e. to element n) Read more
pub fn split_at(
c: &<Page<K, V> as BTreePage<K, V>>::Cursor
) -> (<Page<K, V> as BTreePage<K, V>>::Cursor, <Page<K, V> as BTreePage<K, V>>::Cursor)
[src]Move the cursor to the next position. Returns whether the
cursor was actually moved (i.e. true
if and only if the
cursor isn’t already after the last element). Read more
Move the cursor to the previous position. Returns whether the
cursor was actually moved (i.e. true
if and only if the
cursor isn’t strictly before the page). Read more
Returns the current element, if the cursor is pointing at one.
Returns the left child of the entry pointed to by the cursor.
Returns the right child of the entry pointed to by the cursor.
Sets the cursor to the last element less than or equal to k0
if v0.is_none()
, and to (k0, v0)
if v0.is_some()
. Read more
Returns a cursor set to the first element of the page (i.e. 0). If the page is empty, the returned cursor might be empty. Read more
Returns a cursor set to the last element of the page. If the
cursor is empty, this is the same as cursor_before
. Read more
Return the element currently pointed to by the cursor (if the cursor is not before or after the elements of the page), and move the cursor to the next element. Read more
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Page<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> UnwindSafe for Page<K, V> where
K: UnwindSafe,
V: UnwindSafe,