pub trait Cache<K, V> {
// Required method
fn get_or_insert_with<F>(&mut self, key: K, f: F) -> &mut V
where F: FnOnce() -> V;
}
Required Methods§
fn get_or_insert_with<F>(&mut self, key: K, f: F) -> &mut Vwhere
F: FnOnce() -> V,
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.