pub struct CacheProperties { /* private fields */ }Expand description
Entry properties for in-memory only cache.
Implementations§
Source§impl CacheProperties
impl CacheProperties
Sourcepub fn with_ephemeral(self, ephemeral: bool) -> Self
pub fn with_ephemeral(self, ephemeral: bool) -> Self
Set the entry to be ephemeral.
An ephemeral entry will be evicted immediately after all its holders drop it, no matter if the capacity is reached.
Trait Implementations§
Source§impl Clone for CacheProperties
impl Clone for CacheProperties
Source§fn clone(&self) -> CacheProperties
fn clone(&self) -> CacheProperties
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheProperties
impl Debug for CacheProperties
Source§impl Default for CacheProperties
impl Default for CacheProperties
Source§fn default() -> CacheProperties
fn default() -> CacheProperties
Returns the “default value” for a type. Read more
Source§impl Properties for CacheProperties
impl Properties for CacheProperties
Source§fn with_disposable(self, disposable: bool) -> Self
fn with_disposable(self, disposable: bool) -> Self
Set disposable. Read more
Source§fn disposable(&self) -> Option<bool>
fn disposable(&self) -> Option<bool>
Entry disposable.
Source§fn with_ephemeral(self, ephemeral: bool) -> Self
fn with_ephemeral(self, ephemeral: bool) -> Self
Set entry ephemeral. Read more
Source§fn with_location(self, _: Location) -> Self
fn with_location(self, _: Location) -> Self
Set entry location.
Source§fn with_source(self, _: Source) -> Self
fn with_source(self, _: Source) -> Self
Set entry source.
Auto Trait Implementations§
impl Freeze for CacheProperties
impl RefUnwindSafe for CacheProperties
impl Send for CacheProperties
impl Sync for CacheProperties
impl Unpin for CacheProperties
impl UnwindSafe for CacheProperties
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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