[][src]Struct merkle_cbt::merkle_tree::CBMT

pub struct CBMT<T, M> { /* fields omitted */ }

Implementations

impl<T, M> CBMT<T, M> where
    T: Ord + Default + Clone,
    M: Merge<Item = T>, 
[src]

pub fn build_merkle_root(leaves: &[T]) -> T[src]

pub fn build_merkle_tree(leaves: &[T]) -> MerkleTree<T, M>[src]

pub fn build_merkle_proof(
    leaves: &[T],
    leaf_indices: &[u32]
) -> Option<MerkleProof<T, M>>
[src]

pub fn retrieve_leaves(
    leaves: &[T],
    proof: &MerkleProof<T, M>
) -> Option<Vec<T>>
[src]

retrieve that a proof points to leaves of a tree, returning None if the proof indices is empty or out of bounds

Trait Implementations

impl<T: Default, M: Default> Default for CBMT<T, M>[src]

Auto Trait Implementations

impl<T, M> RefUnwindSafe for CBMT<T, M> where
    M: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, M> Send for CBMT<T, M> where
    M: Send,
    T: Send

impl<T, M> Sync for CBMT<T, M> where
    M: Sync,
    T: Sync

impl<T, M> Unpin for CBMT<T, M> where
    M: Unpin,
    T: Unpin

impl<T, M> UnwindSafe for CBMT<T, M> where
    M: UnwindSafe,
    T: UnwindSafe

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, 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.