Struct ckb_merkle_mountain_range::util::MemMMR
source · [−]pub struct MemMMR<T, M> { /* private fields */ }
Implementations
sourceimpl<T: Clone + Debug + PartialEq, M: Merge<Item = T>> MemMMR<T, M>
impl<T: Clone + Debug + PartialEq, M: Merge<Item = T>> MemMMR<T, M>
pub fn new(mmr_size: u64, store: MemStore<T>) -> Self
pub fn store(&self) -> &MemStore<T>
pub fn mmr_size(&self) -> u64
pub fn get_root(&self) -> Result<T>
pub fn push(&mut self, elem: T) -> Result<u64>
pub fn gen_proof(&self, pos_list: Vec<u64>) -> Result<MerkleProof<T, M>>
Trait Implementations
Auto Trait Implementations
impl<T, M> !RefUnwindSafe for MemMMR<T, M>
impl<T, M> Send for MemMMR<T, M>where
M: Send,
T: Send,
impl<T, M> !Sync for MemMMR<T, M>
impl<T, M> Unpin for MemMMR<T, M>where
M: Unpin,
impl<T, M> UnwindSafe for MemMMR<T, M>where
M: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more