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