#[non_exhaustive]pub struct CachePolicy {
pub records: Duration,
pub misses: Duration,
pub searches: Duration,
}Expand description
How long cached answers are trusted (DESIGN §5). Past these, a provider is asked again; if it then fails, the old answer is served as stale.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.records: Duration§misses: Duration“Not found” answers: short, since works get registered.
searches: DurationTrait Implementations§
Source§impl Clone for CachePolicy
impl Clone for CachePolicy
impl Copy for CachePolicy
Source§impl Debug for CachePolicy
impl Debug for CachePolicy
Source§impl Default for CachePolicy
impl Default for CachePolicy
impl Eq for CachePolicy
Source§impl PartialEq for CachePolicy
impl PartialEq for CachePolicy
impl StructuralPartialEq for CachePolicy
Auto Trait Implementations§
impl Forget for CachePolicy
impl Freeze for CachePolicy
impl RefUnwindSafe for CachePolicy
impl Send for CachePolicy
impl Sync for CachePolicy
impl Unpin for CachePolicy
impl UnsafeUnpin for CachePolicy
impl UnwindSafe for CachePolicy
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