pub enum PagedEntry {
Local(Cell),
Overflow(OverflowRef),
}Expand description
An on-page entry: either a full local cell, or a pointer to an overflow chain carrying the cell’s body.
Variants§
Local(Cell)
Overflow(OverflowRef)
Implementations§
Source§impl PagedEntry
impl PagedEntry
pub fn rowid(&self) -> i64
pub fn encode(&self) -> Result<Vec<u8>>
Sourcepub fn decode(buf: &[u8], pos: usize) -> Result<(PagedEntry, usize)>
pub fn decode(buf: &[u8], pos: usize) -> Result<(PagedEntry, usize)>
Dispatches on the kind tag and returns the appropriate variant.
Only KIND_LOCAL and KIND_OVERFLOW are valid here — PagedEntry
is the table-leaf-cell type, so any other kind means a caller
pointed the wrong decoder at this page (the slot directory layout
is shared across leaf B-Trees, but secondary-index, HNSW, and
FTS leaves carry kind-specific cells decoded by IndexCell::decode,
HnswNodeCell::decode, and FtsPostingCell::decode respectively).
The named-kind error makes that mistake obvious next time.
Trait Implementations§
Source§impl Clone for PagedEntry
impl Clone for PagedEntry
Source§fn clone(&self) -> PagedEntry
fn clone(&self) -> PagedEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PagedEntry
impl Debug for PagedEntry
Source§impl PartialEq for PagedEntry
impl PartialEq for PagedEntry
Source§fn eq(&self, other: &PagedEntry) -> bool
fn eq(&self, other: &PagedEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PagedEntry
Auto Trait Implementations§
impl Freeze for PagedEntry
impl RefUnwindSafe for PagedEntry
impl Send for PagedEntry
impl Sync for PagedEntry
impl Unpin for PagedEntry
impl UnsafeUnpin for PagedEntry
impl UnwindSafe for PagedEntry
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