pub struct Entry {
pub prefix: usize,
pub suffix: Vec<u8>,
pub value: Cid,
pub tree: Option<Cid>,
}Expand description
One entry in a node: a key, the record it names, and what hangs to its right.
The key is stored split, because that is how it is encoded. A node’s
entries are sorted, so each one records how many leading bytes it
shares with its predecessor and then only the rest — p and k in the
node encoding. The first entry in a node shares nothing, because it has no
predecessor in that node; the key of the last entry in the subtree to its
left is not what the prefix is counted against.
Fields§
§prefix: usizeHow many leading bytes this key shares with the previous entry’s.
suffix: Vec<u8>The rest of the key, from prefix onwards, as bytes.
value: CidThe record this key names.
tree: Option<Cid>The subtree of keys that sort after this one and before the next.
Trait Implementations§
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.