pub trait ContainerEntry<'a> {
type Key: 'a;
type Value: 'a;
// Required methods
fn or_default(self) -> &'a mut Self::Value
where Self::Value: Default;
fn or_insert(self, default: Self::Value) -> &'a mut Self::Value;
fn or_insert_with<F>(self, default: F) -> &'a mut Self::Value
where F: FnOnce() -> Self::Value;
fn or_insert_with_key<F>(self, default: F) -> &'a mut Self::Value
where F: FnOnce(&Self::Key) -> Self::Value;
fn key(&self) -> &Self::Key;
fn and_modify<F>(self, f: F) -> Self
where F: FnOnce(&mut Self::Value);
}
Required Associated Types§
Required Methods§
fn or_default(self) -> &'a mut Self::Value
fn or_insert(self, default: Self::Value) -> &'a mut Self::Value
fn or_insert_with<F>(self, default: F) -> &'a mut Self::Value
fn or_insert_with_key<F>(self, default: F) -> &'a mut Self::Value
fn key(&self) -> &Self::Key
fn and_modify<F>(self, f: F) -> Self
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.