Struct http_cache_reqwest::CACacheManager
source · [−]pub struct CACacheManager {
pub path: String,
}Expand description
Implements CacheManager with cacache as the backend.
Fields
path: StringDirectory where the cache will be stored.
Implementations
Clears out the entire cache.
Trait Implementations
pub fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 Url
) -> Pin<Box<dyn Future<Output = Result<Option<(HttpResponse, CachePolicy)>, CacheError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CACacheManager: 'async_trait,
pub fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 Url
) -> Pin<Box<dyn Future<Output = Result<Option<(HttpResponse, CachePolicy)>, CacheError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CACacheManager: 'async_trait,
Attempts to pull a cached response and related policy from cache.
pub fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 Url,
response: HttpResponse,
policy: CachePolicy
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, CacheError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CACacheManager: 'async_trait,
pub fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 Url,
response: HttpResponse,
policy: CachePolicy
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, CacheError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CACacheManager: 'async_trait,
Attempts to cache a response and related policy.
Attempts to remove a record from cache.
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for CACacheManager
impl Send for CACacheManager
impl Sync for CACacheManager
impl Unpin for CACacheManager
impl UnwindSafe for CACacheManager
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