[−][src]Trait tari_mmr::ArrayLike
A trait describing generic array-like behaviour, without imposing any specific details on how this is actually done.
Associated Types
Loading content...Required methods
fn len(&self) -> usize
Returns the number of hashes stored in the backend
fn push(&mut self, item: Self::Value) -> Result<usize, Self::Error>
Store a new item and return the index of the stored item
fn get(&self, index: usize) -> Option<&Self::Value>
Return the item at the given index
fn get_or_panic(&self, index: usize) -> &Self::Value
Return the item at the given index. Use this if you know that the index is valid. Requesting a hash for an invalid index may cause the a panic