pub struct MemoCacheBuilder<V: Clone + Debug> { /* private fields */ }Expand description
Builder for MemoCache, following the COOLJAPAN builder pattern.
Implementations§
Source§impl<V: Clone + Debug> MemoCacheBuilder<V>
impl<V: Clone + Debug> MemoCacheBuilder<V>
Sourcepub fn max_entries(self, max: usize) -> Self
pub fn max_entries(self, max: usize) -> Self
Set the maximum number of entries.
Sourcepub fn eviction(self, policy: MemoEvictionPolicy) -> Self
pub fn eviction(self, policy: MemoEvictionPolicy) -> Self
Set the eviction policy.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for MemoCacheBuilder<V>
impl<V> RefUnwindSafe for MemoCacheBuilder<V>where
V: RefUnwindSafe,
impl<V> Send for MemoCacheBuilder<V>where
V: Send,
impl<V> Sync for MemoCacheBuilder<V>where
V: Sync,
impl<V> Unpin for MemoCacheBuilder<V>where
V: Unpin,
impl<V> UnsafeUnpin for MemoCacheBuilder<V>
impl<V> UnwindSafe for MemoCacheBuilder<V>where
V: UnwindSafe,
Blanket Implementations§
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> 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