[][src]Struct tari_mmr::pruned_hashset::PrunedHashSet

pub struct PrunedHashSet { /* fields omitted */ }

This is a specialised struct that represents a pruned hash set for Merkle Mountain Ranges.

The basic idea is that when adding a new hash, only the peaks to the left of the new node hierarchy are ever needed. This means that if we don't care about the data earlier than a given leaf node index, n_0, (i.e. we still have the hashes, but can't recalculate them from source), we only need to store the local peaks for the MMR at that time and we can forget about the rest. There will never be a request for a hash other than those at the peaks for the MMR with n_0 leaf nodes.

The awesome thing is that this struct can be dropped into MerkleMountainRange as a backend and it. just. works.

Trait Implementations

impl ArrayLike for PrunedHashSet[src]

type Error = MerkleMountainRangeError

type Value = Hash

impl Debug for PrunedHashSet[src]

impl<'_, D, B> TryFrom<&'_ MerkleMountainRange<D, B>> for PrunedHashSet where
    D: Digest,
    B: ArrayLike<Value = Hash>, 
[src]

type Error = MerkleMountainRangeError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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