Struct cfx_storage::storage_db::snapshot_mpt::SnapshotMptNode
source · pub struct SnapshotMptNode(pub VanillaTrieNode<SubtreeMerkleWithSize>);
Expand description
We use VanillaTrieNode<(MerkleHash, i64)>
instead of
(VanillaTrieNode<MerkleHash>, i64)
to make seeking by rlp size position
faster.
Tuple Fields§
§0: VanillaTrieNode<SubtreeMerkleWithSize>
Implementations§
source§impl SnapshotMptNode
impl SnapshotMptNode
pub const NO_CHILD: SubtreeMerkleWithSize = _
pub fn is_valid(&self, path_to_node: &dyn CompressedPathTrait) -> bool
pub fn load_rlp_and_check( rlp_bytes: &[u8], path_to_node: &dyn CompressedPathTrait ) -> Result<Self>
pub fn subtree_size(&self, full_path: &dyn CompressedPathTrait) -> u64
pub fn get_children_merkles(&self) -> Option<[MerkleHash; 16]>
pub fn get_merkle_hash_wo_compressed_path(&self) -> MerkleHash
Trait Implementations§
source§impl Clone for SnapshotMptNode
impl Clone for SnapshotMptNode
source§fn clone(&self) -> SnapshotMptNode
fn clone(&self) -> SnapshotMptNode
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 SnapshotMptNode
impl Debug for SnapshotMptNode
source§impl Decodable for SnapshotMptNode
impl Decodable for SnapshotMptNode
source§impl Default for SnapshotMptNode
impl Default for SnapshotMptNode
source§fn default() -> SnapshotMptNode
fn default() -> SnapshotMptNode
Returns the “default value” for a type. Read more
source§impl DerefMut for SnapshotMptNode
impl DerefMut for SnapshotMptNode
Auto Trait Implementations§
impl RefUnwindSafe for SnapshotMptNode
impl Send for SnapshotMptNode
impl Sync for SnapshotMptNode
impl Unpin for SnapshotMptNode
impl UnwindSafe for SnapshotMptNode
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