pub struct MultiVersionMerklePatriciaTrie { /* private fields */ }
Implementations§
source§impl MultiVersionMerklePatriciaTrie
impl MultiVersionMerklePatriciaTrie
pub fn new( db_manager: Arc<dyn OpenableOnDemandOpenDeltaDbTrait>, snapshot_epoch_id: EpochId, storage_manager: Arc<StorageManager>, mpt_id: u16, node_memory_manager: Arc<NodeMemoryManager<<LRU<u32, (u16, u32)> as CacheAlgorithm>::CacheAlgoData, LRU<u32, (u16, u32)>>> ) -> Result<Self>
pub fn new_single_mpt( db_manager: Arc<dyn OpenableOnDemandOpenDeltaDbTrait>, node_memory_manager: Arc<NodeMemoryManager<<LRU<u32, (u16, u32)> as CacheAlgorithm>::CacheAlgoData, LRU<u32, (u16, u32)>>> ) -> Result<Self>
pub fn get_mpt_id(&self) -> u16
pub fn start_commit( &self ) -> Result<AtomicCommitTransaction<'_, Box<DeltaDbTransactionTraitObj>>>
pub fn get_root_node_ref_by_epoch( &self, epoch_id: &EpochId ) -> Result<Option<Option<NodeRefDeltaMpt>>>
sourcepub fn get_root_node_ref(
&self,
merkle_root: &MerkleHash
) -> Result<Option<NodeRefDeltaMpt>>
pub fn get_root_node_ref( &self, merkle_root: &MerkleHash ) -> Result<Option<NodeRefDeltaMpt>>
Find trie root by merkle root is mainly for debugging.
pub fn get_parent_epoch(&self, epoch_id: &EpochId) -> Result<Option<EpochId>>
pub fn get_node_memory_manager( &self ) -> &NodeMemoryManager<<LRU<u32, (u16, u32)> as CacheAlgorithm>::CacheAlgoData, LRU<u32, (u16, u32)>>
pub fn get_merkle( &self, maybe_node: Option<NodeRefDeltaMpt> ) -> Result<Option<MerkleHash>>
pub fn get_merkle_root_by_epoch_id( &self, epoch_id: &EpochId ) -> Result<Option<MerkleHash>>
pub fn log_usage(&self)
source§impl MultiVersionMerklePatriciaTrie
impl MultiVersionMerklePatriciaTrie
pub fn get_arc_db(&self) -> Result<ArcDeltaDbWrapper>
Trait Implementations§
source§impl MallocSizeOf for MultiVersionMerklePatriciaTrie
impl MallocSizeOf for MultiVersionMerklePatriciaTrie
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.
Auto Trait Implementations§
impl !RefUnwindSafe for MultiVersionMerklePatriciaTrie
impl Send for MultiVersionMerklePatriciaTrie
impl Sync for MultiVersionMerklePatriciaTrie
impl Unpin for MultiVersionMerklePatriciaTrie
impl !UnwindSafe for MultiVersionMerklePatriciaTrie
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