Trait value_trait::prelude::ObjectMut
source · pub trait ObjectMut {
type Key: ?Sized;
type Element;
// Required methods
fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Self::Element>
where Self::Key: Borrow<Q> + Hash + Eq,
Q: ?Sized + Hash + Eq + Ord;
fn insert<K, V>(&mut self, k: K, v: V) -> Option<Self::Element>
where Self::Key: From<K> + Hash + Eq,
V: Into<Self::Element>;
fn remove<Q>(&mut self, k: &Q) -> Option<Self::Element>
where Self::Key: Borrow<Q>,
Q: ?Sized + Hash + Eq + Ord;
}
Expand description
A mutable value Object
Required Associated Types§
Required Methods§
sourcefn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Self::Element>
fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Self::Element>
Gets the value of a key as a mutable reference.
Object Safety§
This trait is not object safe.