Struct tari_mmr::MerkleCheckPoint [−][src]
Implementations
impl MerkleCheckPoint
[src]
pub fn new(
nodes_added: Vec<Hash>,
nodes_deleted: Bitmap,
prev_accumulated_nodes_added_count: u32
) -> MerkleCheckPoint
[src]
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>,
[src]
&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.
pub fn reset(&mut self)
[src]
Resets the current MerkleCheckpoint. The accumulated_nodes_added_count is set to the current MerkleCheckpoint
s
count.
pub fn reset_to(&mut self, checkpoint: &Self)
[src]
Resets the current MerkleCheckpoint. The accumulated_nodes_added_count is set to the given MerkleCheckpoint
s
count.
pub fn push_addition(&mut self, hash: Hash)
[src]
Add a hash to the set of nodes added.
pub fn push_deletion(&mut self, leaf_index: u32)
[src]
Add a a deleted index to the set of deleted nodes.
pub fn nodes_added(&self) -> &Vec<Hash>
[src]
Return a reference to the hashes of the nodes added in the checkpoint
pub fn nodes_deleted(&self) -> &Bitmap
[src]
Return a reference to the roaring bitmap of nodes that were deleted in this checkpoint
pub fn accumulated_nodes_added_count(&self) -> u32
[src]
Return the the total accumulated added node count including this checkpoint
pub fn append(&mut self, mut cp: MerkleCheckPoint)
[src]
Merge the provided Merkle checkpoint into the current checkpoint.
pub fn into_parts(self) -> (Vec<Hash>, Bitmap)
[src]
Break a checkpoint up into its constituent parts
Trait Implementations
impl Clone for MerkleCheckPoint
[src]
fn clone(&self) -> MerkleCheckPoint
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MerkleCheckPoint
[src]
impl Default for MerkleCheckPoint
[src]
impl<'de> Deserialize<'de> for MerkleCheckPoint
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for MerkleCheckPoint
[src]
impl Hash for MerkleCheckPoint
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MerkleCheckPoint> for MerkleCheckPoint
[src]
fn eq(&self, other: &MerkleCheckPoint) -> bool
[src]
fn ne(&self, other: &MerkleCheckPoint) -> bool
[src]
impl Serialize for MerkleCheckPoint
[src]
impl StructuralPartialEq for MerkleCheckPoint
[src]
Auto Trait Implementations
impl RefUnwindSafe for MerkleCheckPoint
[src]
impl Send for MerkleCheckPoint
[src]
impl Sync for MerkleCheckPoint
[src]
impl Unpin for MerkleCheckPoint
[src]
impl UnwindSafe for MerkleCheckPoint
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
pub fn clear(&mut self)
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
pub unsafe fn initialize(place: *mut T)
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MessageFormat for T where
T: DeserializeOwned + Serialize,
[src]
T: DeserializeOwned + Serialize,
pub fn to_binary(&self) -> Result<Vec<u8, Global>, MessageFormatError>
[src]
pub fn to_json(&self) -> Result<String, MessageFormatError>
[src]
pub fn to_base64(&self) -> Result<String, MessageFormatError>
[src]
pub fn from_binary(msg: &[u8]) -> Result<T, MessageFormatError>
[src]
pub fn from_json(msg: &str) -> Result<T, MessageFormatError>
[src]
pub fn from_base64(msg: &str) -> Result<T, MessageFormatError>
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,