Struct cfx_storage::NodeRefDeltaMptCompact
source · pub struct NodeRefDeltaMptCompact { /* private fields */ }
Expand description
The MSB is used to indicate if a node is in mem or on disk, the rest 31 bits specifies the index of the node in the memory region.
It’s necessary to use MaybeNodeRef in ChildrenTable because it consumes less space than NodeRef.
Implementations§
source§impl NodeRefDeltaMptCompact
impl NodeRefDeltaMptCompact
sourcepub const DIRTY_SLOT_LIMIT: u32 = 2_147_483_647u32
pub const DIRTY_SLOT_LIMIT: u32 = 2_147_483_647u32
Valid dirty slot ranges from [0..DIRTY_SLOT_LIMIT). The DIRTY_SLOT_LIMIT is reserved for MaybeNodeRefDeltaMptCompact#NULL.
pub fn new(value: CompactNodeRef) -> Self
Trait Implementations§
source§impl Clone for NodeRefDeltaMptCompact
impl Clone for NodeRefDeltaMptCompact
source§fn clone(&self) -> NodeRefDeltaMptCompact
fn clone(&self) -> NodeRefDeltaMptCompact
Returns a copy of the value. Read more
1.0.0 · 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 NodeRefDeltaMptCompact
impl Debug for NodeRefDeltaMptCompact
source§impl Decodable for NodeRefDeltaMptCompact
impl Decodable for NodeRefDeltaMptCompact
source§impl Encodable for NodeRefDeltaMptCompact
impl Encodable for NodeRefDeltaMptCompact
source§impl From<NodeRefDeltaMpt> for NodeRefDeltaMptCompact
impl From<NodeRefDeltaMpt> for NodeRefDeltaMptCompact
source§fn from(node: NodeRefDeltaMpt) -> Self
fn from(node: NodeRefDeltaMpt) -> Self
Converts to this type from the input type.
source§impl From<NodeRefDeltaMptCompact> for NodeRefDeltaMpt
impl From<NodeRefDeltaMptCompact> for NodeRefDeltaMpt
source§fn from(x: NodeRefDeltaMptCompact) -> Self
fn from(x: NodeRefDeltaMptCompact) -> Self
Converts to this type from the input type.
source§impl MallocSizeOf for NodeRefDeltaMptCompact
impl MallocSizeOf for NodeRefDeltaMptCompact
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for NodeRefDeltaMptCompact
impl PartialEq for NodeRefDeltaMptCompact
source§fn eq(&self, other: &NodeRefDeltaMptCompact) -> bool
fn eq(&self, other: &NodeRefDeltaMptCompact) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for NodeRefDeltaMptCompact
impl Eq for NodeRefDeltaMptCompact
impl StructuralPartialEq for NodeRefDeltaMptCompact
Auto Trait Implementations§
impl RefUnwindSafe for NodeRefDeltaMptCompact
impl Send for NodeRefDeltaMptCompact
impl Sync for NodeRefDeltaMptCompact
impl Unpin for NodeRefDeltaMptCompact
impl UnwindSafe for NodeRefDeltaMptCompact
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