Trait tari_mmr::ArrayLike [−][src]
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) -> Result<usize, Self::Error>
[src]
Returns the number of hashes stored in the backend
fn is_empty(&self) -> Result<bool, Self::Error>
[src]
Returns if empty
fn push(&mut self, item: Self::Value) -> Result<usize, Self::Error>
[src]
Store a new item and return the index of the stored item
fn get(&self, index: usize) -> Result<Option<Self::Value>, Self::Error>
[src]
Return the item at the given index
fn clear(&mut self) -> Result<(), Self::Error>
[src]
Remove all stored items from the the backend.
fn position(&self, item: &Self::Value) -> Result<Option<usize>, Self::Error>
[src]
Finds the index of the specified stored item, it will return None if the object could not be found.