Struct closure_cacher::Cacher [−][src]
pub struct Cacher<I, O, T> where
T: Fn(I) -> O, { /* fields omitted */ }
Cacher Struct that allows provision of a closure and memoizes its output
Examples
use closure_cacher::Cacher; let mut cacher = Cacher::new(|x| x + 1); assert_eq!(cacher.get(&1), &2);
Implementations
Auto Trait Implementations
impl<I, O, T> RefUnwindSafe for Cacher<I, O, T> where
I: RefUnwindSafe,
O: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, O, T> Send for Cacher<I, O, T> where
I: Send,
O: Send,
T: Send,
I: Send,
O: Send,
T: Send,
impl<I, O, T> Sync for Cacher<I, O, T> where
I: Sync,
O: Sync,
T: Sync,
I: Sync,
O: Sync,
T: Sync,
impl<I, O, T> Unpin for Cacher<I, O, T> where
I: Unpin,
O: Unpin,
T: Unpin,
I: Unpin,
O: Unpin,
T: Unpin,
impl<I, O, T> UnwindSafe for Cacher<I, O, T> where
I: UnwindSafe,
O: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
T: UnwindSafe,