pub struct DefaultStore<V> { /* private fields */ }
Implementations§
Source§impl<V> DefaultStore<V>
impl<V> DefaultStore<V>
pub fn branches_map(&self) -> &Map<H256, BranchNode>
pub fn leaves_map(&self) -> &Map<H256, LeafNode<V>>
pub fn clear(&mut self)
Trait Implementations§
Source§impl<V: Clone> Clone for DefaultStore<V>
impl<V: Clone> Clone for DefaultStore<V>
Source§fn clone(&self) -> DefaultStore<V>
fn clone(&self) -> DefaultStore<V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<V: Debug> Debug for DefaultStore<V>
impl<V: Debug> Debug for DefaultStore<V>
Source§impl<V: Default> Default for DefaultStore<V>
impl<V: Default> Default for DefaultStore<V>
Source§fn default() -> DefaultStore<V>
fn default() -> DefaultStore<V>
Returns the “default value” for a type. Read more
Source§impl<V: Clone> Store<V> for DefaultStore<V>
impl<V: Clone> Store<V> for DefaultStore<V>
fn get_branch(&self, node: &H256) -> Result<Option<BranchNode>, Error>
fn get_leaf(&self, leaf_hash: &H256) -> Result<Option<LeafNode<V>>, Error>
fn insert_branch(&mut self, node: H256, branch: BranchNode) -> Result<(), Error>
fn insert_leaf( &mut self, leaf_hash: H256, leaf: LeafNode<V>, ) -> Result<(), Error>
fn remove_branch(&mut self, node: &H256) -> Result<(), Error>
fn remove_leaf(&mut self, leaf_hash: &H256) -> Result<(), Error>
Auto Trait Implementations§
impl<V> Freeze for DefaultStore<V>
impl<V> RefUnwindSafe for DefaultStore<V>where
V: RefUnwindSafe,
impl<V> Send for DefaultStore<V>where
V: Send,
impl<V> Sync for DefaultStore<V>where
V: Sync,
impl<V> Unpin for DefaultStore<V>where
V: Unpin,
impl<V> UnwindSafe for DefaultStore<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more