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 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 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