pub trait AoraMap<K, V, const KEY_LEN: usize = 32>{
// Required methods
fn contains_key(&self, key: K) -> bool;
fn get(&self, key: K) -> Option<V>;
fn insert(&mut self, key: K, item: &V);
fn iter(&self) -> impl Iterator<Item = (K, V)>;
// Provided methods
fn get_expect(&self, key: K) -> V { ... }
fn extend<'a>(&mut self, iter: impl IntoIterator<Item = (K, &'a V)>)
where V: 'a { ... }
}Expand description
Trait for providers of append-only key-value maps.
Required Methods§
Sourcefn contains_key(&self, key: K) -> bool
fn contains_key(&self, key: K) -> bool
Checks whether a given value is present in the log.
Provided Methods§
Sourcefn get_expect(&self, key: K) -> V
fn get_expect(&self, key: K) -> V
Sourcefn extend<'a>(&mut self, iter: impl IntoIterator<Item = (K, &'a V)>)where
V: 'a,
fn extend<'a>(&mut self, iter: impl IntoIterator<Item = (K, &'a V)>)where
V: 'a,
Inserts (appends) all items from an iterator to the append-only log.
§Panic
Panics if any of the items is different from an item under the same id already present in the log.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.