pub struct RequestCacheConfig { /* private fields */ }Expand description
Configuration for request caching behavior
Implementations§
Source§impl RequestCacheConfig
impl RequestCacheConfig
Sourcepub fn with_max_entries(self, max_entries: usize) -> Self
pub fn with_max_entries(self, max_entries: usize) -> Self
Set the maximum number of cache entries
Sourcepub fn with_default_ttl(self, ttl: Duration) -> Self
pub fn with_default_ttl(self, ttl: Duration) -> Self
Set the default TTL for cache entries
Sourcepub fn with_cleanup_interval(self, interval: Duration) -> Self
pub fn with_cleanup_interval(self, interval: Duration) -> Self
Set the cleanup interval for expired entries
Sourcepub fn max_entries(&self) -> usize
pub fn max_entries(&self) -> usize
Get the maximum number of entries
Sourcepub fn default_ttl(&self) -> Duration
pub fn default_ttl(&self) -> Duration
Get the default TTL
Sourcepub fn cleanup_interval(&self) -> Duration
pub fn cleanup_interval(&self) -> Duration
Get the cleanup interval
Trait Implementations§
Source§impl Clone for RequestCacheConfig
impl Clone for RequestCacheConfig
Source§fn clone(&self) -> RequestCacheConfig
fn clone(&self) -> RequestCacheConfig
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 RequestCacheConfig
impl Debug for RequestCacheConfig
Auto Trait Implementations§
impl Freeze for RequestCacheConfig
impl RefUnwindSafe for RequestCacheConfig
impl Send for RequestCacheConfig
impl Sync for RequestCacheConfig
impl Unpin for RequestCacheConfig
impl UnsafeUnpin for RequestCacheConfig
impl UnwindSafe for RequestCacheConfig
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