pub struct FreshnessPolicy { /* private fields */ }Implementations§
Source§impl FreshnessPolicy
impl FreshnessPolicy
pub fn new( ttl: Duration, stale_while_revalidate: Option<Duration>, ) -> Result<Self, CacheModelError>
pub fn ttl(&self) -> Duration
pub fn stale_while_revalidate(&self) -> Option<Duration>
pub fn ttl_seconds(&self) -> u64
pub fn stale_while_revalidate_seconds(&self) -> Option<u64>
Trait Implementations§
Source§impl Clone for FreshnessPolicy
impl Clone for FreshnessPolicy
Source§fn clone(&self) -> FreshnessPolicy
fn clone(&self) -> FreshnessPolicy
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 FreshnessPolicy
impl Debug for FreshnessPolicy
Source§impl<'de> Deserialize<'de> for FreshnessPolicy
impl<'de> Deserialize<'de> for FreshnessPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FreshnessPolicy
impl PartialEq for FreshnessPolicy
Source§impl Serialize for FreshnessPolicy
impl Serialize for FreshnessPolicy
impl Copy for FreshnessPolicy
impl Eq for FreshnessPolicy
impl StructuralPartialEq for FreshnessPolicy
Auto Trait Implementations§
impl Freeze for FreshnessPolicy
impl RefUnwindSafe for FreshnessPolicy
impl Send for FreshnessPolicy
impl Sync for FreshnessPolicy
impl Unpin for FreshnessPolicy
impl UnsafeUnpin for FreshnessPolicy
impl UnwindSafe for FreshnessPolicy
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