pub struct CacheOptions {
pub mode: CacheMode,
pub ttl: Option<Duration>,
pub max_entries: usize,
pub validate_metadata: bool,
}Expand description
Configuration for a discovery cache instance.
Fields§
§mode: CacheModeStorage mode.
ttl: Option<Duration>Optional time-to-live for entries.
max_entries: usizeMaximum number of cached keys.
validate_metadata: boolReserved for future metadata revalidation (directory mtime, etc.).
Directory timestamps are not a perfect invalidation mechanism and are not used as a security signal even when enabled in future versions.
Implementations§
Source§impl CacheOptions
impl CacheOptions
Trait Implementations§
Source§impl Clone for CacheOptions
impl Clone for CacheOptions
Source§fn clone(&self) -> CacheOptions
fn clone(&self) -> CacheOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CacheOptions
impl Debug for CacheOptions
Source§impl Default for CacheOptions
impl Default for CacheOptions
impl Eq for CacheOptions
Source§impl PartialEq for CacheOptions
impl PartialEq for CacheOptions
impl StructuralPartialEq for CacheOptions
Auto Trait Implementations§
impl Freeze for CacheOptions
impl RefUnwindSafe for CacheOptions
impl Send for CacheOptions
impl Sync for CacheOptions
impl Unpin for CacheOptions
impl UnsafeUnpin for CacheOptions
impl UnwindSafe for CacheOptions
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