pub trait Entry<'a>: RawEntry<'a> {
// Required methods
fn or_insert(self, value: Self::Value) -> &'a mut Self::Value;
fn or_insert_with<F>(self, f: F) -> &'a mut Self::Value
where F: FnOnce() -> Self::Value;
}
Required Methods§
Sourcefn or_insert(self, value: Self::Value) -> &'a mut Self::Value
fn or_insert(self, value: Self::Value) -> &'a mut Self::Value
if the entry is vacant, insert the given value
Sourcefn or_insert_with<F>(self, f: F) -> &'a mut Self::Value
fn or_insert_with<F>(self, f: F) -> &'a mut Self::Value
if the entry does not exist, insert the value returned by the provided function and return a mutable reference to it.
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.