pub trait FnCache<I, O> {
// Required method
fn get(&mut self, input: I) -> &O;
}Expand description
The generic trait for all caches.
This trait is implemented on all caches. This allows
someone to write a function like
fn f(cache: &mut impl FnCache<u32,u32>, x: &u32) -> u32
and have it work for all the caches written in this crate.