pub struct MerkleMountainRange<T: Hashable> { /* private fields */ }

Implementations§

This function returns a reference to the data stored in the mmr It will return none if the hash does not exist

This function returns a mut reference to the data stored in the MMR It will return none if the hash does not exist

This function returns the hash proof tree of a given hash. If the given hash is not in the tree, the vec will be empty. The Vec will be created in form of the Lchild-Rchild-parent(Lchild)-Rchild-parent-.. This pattern will be repeated until the parent is the root of the MMR

This function will verify the provided proof. Internally it uses the get_hash_proof function to construct a similar proof. This function will return true if the proof is valid If the order does not match Lchild-Rchild-parent(Lchild)-Rchild-parent-.. the validation will fail This function will only succeed if the given hash is of height 0

This function returns the peak height of the mmr

This function will return the single merkle root of the MMR.

This function adds a vec of leaf nodes to the mmr.

This function adds a new leaf node to the mmr.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.