Trait amplify::confinement::KeyedCollection
source · pub trait KeyedCollection: Collection<Item = (Self::Key, Self::Value)> {
type Key: Eq + Hash;
type Value;
// Required methods
fn get_mut(&mut self, key: &Self::Key) -> Option<&mut Self::Value>;
fn insert(
&mut self,
key: Self::Key,
value: Self::Value
) -> Option<Self::Value>;
fn remove(&mut self, key: &Self::Key) -> Option<Self::Value>;
}
Expand description
Trait implemented by key-value maps which need to support collection confinement.
Required Associated Types§
Required Methods§
sourcefn get_mut(&mut self, key: &Self::Key) -> Option<&mut Self::Value>
fn get_mut(&mut self, key: &Self::Key) -> Option<&mut Self::Value>
Gets mutable element of the collection
Object Safety§
This trait is not object safe.