[][src]Struct ckb_merkle_mountain_range::MMRBatch

pub struct MMRBatch<Elem: MerkleElem, Store: MMRStore<Elem>> { /* fields omitted */ }

Methods

impl<Elem: MerkleElem + Clone, Store: MMRStore<Elem>> MMRBatch<Elem, Store>[src]

pub fn new(store: Store) -> Self[src]

pub fn append(&mut self, pos: u64, elems: Vec<Elem>) -> Result<()>[src]

pub fn get_elem(&self, pos: u64) -> Result<Option<Elem>>[src]

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

Trait Implementations

impl<Elem: Default + MerkleElem, Store: Default + MMRStore<Elem>> Default for MMRBatch<Elem, Store>[src]

impl<Elem: MerkleElem, Store: MMRStore<Elem>> IntoIterator for MMRBatch<Elem, Store>[src]

type Item = (u64, Vec<Elem>)

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<Elem, Store> Send for MMRBatch<Elem, Store> where
    Elem: Send,
    Store: Send

impl<Elem, Store> Unpin for MMRBatch<Elem, Store> where
    Elem: Unpin,
    Store: Unpin

impl<Elem, Store> Sync for MMRBatch<Elem, Store> where
    Elem: Sync,
    Store: Sync

impl<Elem, Store> UnwindSafe for MMRBatch<Elem, Store> where
    Elem: UnwindSafe,
    Store: UnwindSafe

impl<Elem, Store> RefUnwindSafe for MMRBatch<Elem, Store> where
    Elem: RefUnwindSafe,
    Store: RefUnwindSafe

Blanket Implementations

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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