pub trait MapRead<'a, K: 'a + Copy + Clone + PartialEq + Eq + Hash + Serialize + Deserialize<'a> + Sync, V: 'a + Clone + PartialEq + Eq + Serialize + Deserialize<'a> + Sync> {
    type Iterator: Iterator<Item = (Cow<'a, K>, Cow<'a, V>)>;
    type Keys: Iterator<Item = Cow<'a, K>>;
    type Values: Iterator<Item = Cow<'a, V>>;

    fn contains_key<Q>(&self, key: &Q) -> Result<bool>
    where
        K: Borrow<Q>,
        Q: PartialEq + Eq + Hash + Serialize + ?Sized
; fn get<Q>(&'a self, key: &Q) -> Result<Option<Cow<'a, V>>>
    where
        K: Borrow<Q>,
        Q: PartialEq + Eq + Hash + Serialize + ?Sized
; fn iter(&'a self) -> Self::Iterator; fn keys(&'a self) -> Self::Keys; fn values(&'a self) -> Self::Values; }
Expand description

A trait representing map-like storage operations with read-only capabilities.

Required Associated Types

Required Methods

Returns true if the given key exists in the map.

Returns the value for the given key from the map, if it exists.

Returns an iterator visiting each key-value pair in the map.

Returns an iterator over each key in the map.

Returns an iterator over each value in the map.

Implementors