pub struct MultiVersionMerklePatriciaTrie { /* private fields */ }

Implementations§

source§

impl MultiVersionMerklePatriciaTrie

source

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>

source

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>

source

pub fn get_mpt_id(&self) -> u16

source

pub fn start_commit( &self ) -> Result<AtomicCommitTransaction<'_, Box<DeltaDbTransactionTraitObj>>>

source

pub fn get_root_node_ref_by_epoch( &self, epoch_id: &EpochId ) -> Result<Option<Option<NodeRefDeltaMpt>>>

source

pub fn get_root_node_ref( &self, merkle_root: &MerkleHash ) -> Result<Option<NodeRefDeltaMpt>>

Find trie root by merkle root is mainly for debugging.

source

pub fn get_parent_epoch(&self, epoch_id: &EpochId) -> Result<Option<EpochId>>

source

pub fn get_node_memory_manager( &self ) -> &NodeMemoryManager<<LRU<u32, (u16, u32)> as CacheAlgorithm>::CacheAlgoData, LRU<u32, (u16, u32)>>

source

pub fn get_merkle( &self, maybe_node: Option<NodeRefDeltaMpt> ) -> Result<Option<MerkleHash>>

source

pub fn get_merkle_root_by_epoch_id( &self, epoch_id: &EpochId ) -> Result<Option<MerkleHash>>

source

pub fn log_usage(&self)

source§

impl MultiVersionMerklePatriciaTrie

Trait Implementations§

source§

impl MallocSizeOf for MultiVersionMerklePatriciaTrie

source§

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§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> ElementSatisfy<ElementNoConstrain> for T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V