Struct http_cache::HttpCacheOptions
source · pub struct HttpCacheOptions {
pub cache_options: Option<CacheOptions>,
pub cache_key: Option<CacheKey>,
pub cache_mode_fn: Option<CacheModeFn>,
pub cache_bust: Option<CacheBust>,
}
Expand description
Can be used to override the default CacheOptions
and cache key.
The cache key is a closure that takes http::request::Parts
and returns a String
.
Fields§
§cache_options: Option<CacheOptions>
Override the default cache options.
cache_key: Option<CacheKey>
Override the default cache key generator.
cache_mode_fn: Option<CacheModeFn>
Override the default cache mode.
cache_bust: Option<CacheBust>
Bust the caches of the returned keys.
Trait Implementations§
source§impl Clone for HttpCacheOptions
impl Clone for HttpCacheOptions
source§fn clone(&self) -> HttpCacheOptions
fn clone(&self) -> HttpCacheOptions
Returns a copy 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 HttpCacheOptions
impl Debug for HttpCacheOptions
source§impl Default for HttpCacheOptions
impl Default for HttpCacheOptions
source§fn default() -> HttpCacheOptions
fn default() -> HttpCacheOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HttpCacheOptions
impl Send for HttpCacheOptions
impl Sync for HttpCacheOptions
impl Unpin for HttpCacheOptions
impl !UnwindSafe for HttpCacheOptions
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