Struct tari_mmr::MerkleCheckPoint [−][src]
pub struct MerkleCheckPoint { /* fields omitted */ }
Implementations
pub fn new(
nodes_added: Vec<Hash>,
nodes_deleted: Bitmap,
prev_accumulated_nodes_added_count: u32
) -> MerkleCheckPoint
pub fn apply<D, B2>(
&self,
mmr: &mut MutableMmr<D, B2>
) -> Result<(), MerkleMountainRangeError> where
D: Digest,
B2: ArrayLike<Value = Hash>,
pub fn apply<D, B2>(
&self,
mmr: &mut MutableMmr<D, B2>
) -> Result<(), MerkleMountainRangeError> where
D: Digest,
B2: ArrayLike<Value = Hash>,
Apply this checkpoint to the MMR provided. Take care: The deleted
set is not compressed after returning
from here.
Resets the current MerkleCheckpoint. The accumulated_nodes_added_count is set to the current MerkleCheckpoint
s
count.
Resets the current MerkleCheckpoint. The accumulated_nodes_added_count is set to the given MerkleCheckpoint
s
count.
Add a hash to the set of nodes added.
Add a a deleted index to the set of deleted nodes.
Return a reference to the hashes of the nodes added in the checkpoint
Return a reference to the roaring bitmap of nodes that were deleted in this checkpoint
Return the the total accumulated added node count including this checkpoint
Merge the provided Merkle checkpoint into the current checkpoint.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MerkleCheckPoint
impl Send for MerkleCheckPoint
impl Sync for MerkleCheckPoint
impl Unpin for MerkleCheckPoint
impl UnwindSafe for MerkleCheckPoint
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
pub fn clear(&mut self)
pub fn clear(&mut self)
Completely overwrites this value.
impl<T> InitializableFromZeroed for T where
T: Default,
impl<T> InitializableFromZeroed for T where
T: Default,
pub unsafe fn initialize(place: *mut T)
pub unsafe fn initialize(place: *mut T)
Called to initialize a place to a valid value, after it is set to all-bits-zero. Read more
type Output = T
type Output = T
Should always be Self