Cache

Trait Cache 

Source
pub trait Cache<I, O> {
    // Required method
    fn find<Q>(&self, q: &Q) -> O
       where Q: Eq + Hash + ToOwned<Owned = I> + ?Sized,
             I: Borrow<Q>;
}
Expand description

A cache that can be polled for a value with its borrowed form.

Required Methods§

Source

fn find<Q>(&self, q: &Q) -> O
where Q: Eq + Hash + ToOwned<Owned = I> + ?Sized, I: Borrow<Q>,

Obtain the return value of the function for the owned version of this input.

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§