Struct http_cache::HttpCache
source · [−]pub struct HttpCache<T: CacheManager + Send + Sync + 'static> {
pub mode: CacheMode,
pub manager: T,
pub options: Option<CacheOptions>,
}Expand description
Caches requests according to http spec.
Fields
mode: CacheModeDetermines the manager behavior.
manager: TManager instance that implements the CacheManager trait.
By default, a manager implementation with cacache
as the backend has been provided, see CACacheManager.
options: Option<CacheOptions>Override the default cache options.
Implementations
Attempts to run the passed middleware along with the cache
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for HttpCache<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for HttpCache<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more