[][src]Trait muta_protocol::traits::StoreMap

pub trait StoreMap<Key: FixedCodec + PartialEq, Value: FixedCodec> {
    fn get(&self, key: &Key) -> ProtocolResult<Value>;
fn contains(&self, key: &Key) -> ProtocolResult<bool>;
fn insert(&mut self, key: Key, value: Value) -> ProtocolResult<()>;
fn remove(&mut self, key: &Key) -> ProtocolResult<()>;
fn len(&self) -> ProtocolResult<u32>;
fn is_empty(&self) -> ProtocolResult<bool>;
fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = (&Key, Value)> + 'a>; }

Required methods

fn get(&self, key: &Key) -> ProtocolResult<Value>

fn contains(&self, key: &Key) -> ProtocolResult<bool>

fn insert(&mut self, key: Key, value: Value) -> ProtocolResult<()>

fn remove(&mut self, key: &Key) -> ProtocolResult<()>

fn len(&self) -> ProtocolResult<u32>

fn is_empty(&self) -> ProtocolResult<bool>

fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = (&Key, Value)> + 'a>

Loading content...

Implementors

Loading content...