Skip to main content

CacheOptionsSetters

Trait CacheOptionsSetters 

Source
pub trait CacheOptionsSetters: Holds<CacheOptions> + Sized {
    // Required methods
    fn ttl(self, value: impl Into<Duration>) -> Self;
    fn negative_ttl(self, value: impl Into<Duration>) -> Self;
    fn max_entries(self, value: u64) -> Self;
}
Expand description

The typed setters of CacheOptions, for any builder that holds its settings.

Required Methods§

Source

fn ttl(self, value: impl Into<Duration>) -> Self

How long a person found or a grant is kept.

Source

fn negative_ttl(self, value: impl Into<Duration>) -> Self

How long “no such person” or a denial is kept.

Source

fn max_entries(self, value: u64) -> Self

The most answers kept of each kind (lookups, decisions); 0 keeps none.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<__B> CacheOptionsSetters for __B
where __B: Holds<CacheOptions>,