[−][src]Struct ckb_merkle_mountain_range::MMR
Methods
impl<'a, Elem: MerkleElem + Clone + PartialEq + Debug, Store: MMRStore<Elem>> MMR<'a, Elem, Store>
[src]
pub fn new(mmr_size: u64, batch: &'a mut MMRBatch<Elem, Store>) -> Self
[src]
pub fn mmr_size(&self) -> u64
[src]
pub fn empty(&self) -> bool
[src]
pub fn push(&mut self, elem: Elem) -> Result<u64>
[src]
pub fn get_root(&self) -> Result<Elem>
[src]
get_root
pub fn gen_proof(&self, pos: u64) -> Result<MerkleProof<Elem>>
[src]
Auto Trait Implementations
impl<'a, Elem, Store> Send for MMR<'a, Elem, Store> where
Elem: Send,
Store: Send,
Elem: Send,
Store: Send,
impl<'a, Elem, Store> Unpin for MMR<'a, Elem, Store> where
Elem: Unpin,
Elem: Unpin,
impl<'a, Elem, Store> Sync for MMR<'a, Elem, Store> where
Elem: Sync,
Store: Sync,
Elem: Sync,
Store: Sync,
impl<'a, Elem, Store> !UnwindSafe for MMR<'a, Elem, Store>
impl<'a, Elem, Store> RefUnwindSafe for MMR<'a, Elem, Store> where
Elem: RefUnwindSafe,
Store: RefUnwindSafe,
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,