[][src]Struct ckb_merkle_mountain_range::MMR

pub struct MMR<T, M, S: MMRStore<T>> { /* fields omitted */ }

Methods

impl<'a, T: Clone + PartialEq + Debug, M: Merge<Item = T>, S: MMRStore<T>> MMR<T, M, S>[src]

pub fn new(mmr_size: u64, store: S) -> Self[src]

pub fn mmr_size(&self) -> u64[src]

pub fn is_empty(&self) -> bool[src]

pub fn push(&mut self, elem: T) -> Result<u64>[src]

pub fn get_root(&self) -> Result<T>[src]

get_root

pub fn gen_proof(&self, pos: u64) -> Result<MerkleProof<T, M>>[src]

pub fn commit(self) -> Result<()>[src]

Auto Trait Implementations

impl<T, M, S> Send for MMR<T, M, S> where
    M: Send,
    S: Send,
    T: Send

impl<T, M, S> Unpin for MMR<T, M, S> where
    M: Unpin,
    S: Unpin,
    T: Unpin

impl<T, M, S> Sync for MMR<T, M, S> where
    M: Sync,
    S: Sync,
    T: Sync

impl<T, M, S> UnwindSafe for MMR<T, M, S> where
    M: UnwindSafe,
    S: UnwindSafe,
    T: UnwindSafe

impl<T, M, S> RefUnwindSafe for MMR<T, M, S> where
    M: RefUnwindSafe,
    S: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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