Trait Cache

Source
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§

Source

fn get_or_insert_with<F>(&mut self, key: K, f: F) -> &mut V
where 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.

Implementors§