pub struct Cache<'a, C, K, V> { /* private fields */ }Expand description
A cache for calling a function with a key and value.
Implementations§
Trait Implementations§
Source§impl<E, P> CPDEstimator<P> for Cache<'_, E, (Vec<usize>, Vec<usize>), P>where
E: CPDEstimator<P>,
P: Clone,
impl<E, P> CPDEstimator<P> for Cache<'_, E, (Vec<usize>, Vec<usize>), P>where
E: CPDEstimator<P>,
P: Clone,
Source§impl<C, K, V> HasLabels for Cache<'_, C, K, V>where
C: HasLabels,
impl<C, K, V> HasLabels for Cache<'_, C, K, V>where
C: HasLabels,
Source§fn label_to_index(&self, x: &str) -> Result<usize>
fn label_to_index(&self, x: &str) -> Result<usize>
Return the variable index for a given label. Read more
Source§fn index_to_label(&self, x: usize) -> Result<&str>
fn index_to_label(&self, x: usize) -> Result<&str>
Return the label for a given variable index. Read more
Source§fn index_to(&self, x: usize, other: &Labels) -> Result<usize>
fn index_to(&self, x: usize, other: &Labels) -> Result<usize>
Maps an index from this model to another model with the same label. Read more
Source§fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Result<Set<usize>>
fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Result<Set<usize>>
Maps a set of indices from this model to another model with the same labels. Read more
Auto Trait Implementations§
impl<'a, C, K, V> Freeze for Cache<'a, C, K, V>
impl<'a, C, K, V> RefUnwindSafe for Cache<'a, C, K, V>where
&'a C: RefUnwindSafe,
Arc<RwLock<IndexMap<K, V, BuildHasherDefault<FxHasher>>>>: RefUnwindSafe,
impl<'a, C, K, V> Send for Cache<'a, C, K, V>
impl<'a, C, K, V> Sync for Cache<'a, C, K, V>
impl<'a, C, K, V> Unpin for Cache<'a, C, K, V>
impl<'a, C, K, V> UnsafeUnpin for Cache<'a, C, K, V>
impl<'a, C, K, V> UnwindSafe for Cache<'a, C, K, V>
Blanket Implementations§
Source§impl<T, E> BNEstimator<T> for E
impl<T, E> BNEstimator<T> for E
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, E> CTBNEstimator<T> for E
impl<T, E> CTBNEstimator<T> for E
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more