pub struct Policy { /* private fields */ }
Expand description
The policy of a cache.
Implementations§
source§impl Policy
impl Policy
sourcepub fn max_capacity(&self) -> Option<u64>
pub fn max_capacity(&self) -> Option<u64>
Returns the max_capacity
of the cache.
sourcepub fn num_segments(&self) -> usize
pub fn num_segments(&self) -> usize
Returns the number of internal segments of the cache.
sourcepub fn time_to_live(&self) -> Option<Duration>
pub fn time_to_live(&self) -> Option<Duration>
Returns the time_to_live
of the cache.
sourcepub fn time_to_idle(&self) -> Option<Duration>
pub fn time_to_idle(&self) -> Option<Duration>
Returns the time_to_idle
of the cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)