Skip to main content

CacheableEncodableRequest

Trait CacheableEncodableRequest 

Source
pub trait CacheableEncodableRequest<RequestBodyT> {
    // Required methods
    fn should_skip_cache<CacheT, CacheKeyT>(
        &self,
        configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>,
    ) -> bool;
    fn cache_key_with_hook<CacheT, CacheKeyT>(
        &self,
        configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>,
    ) -> CacheKeyT
       where CacheKeyT: CacheKey;
    fn select_encoding(
        &self,
        configuration: &MiddlewareEncodingConfiguration,
    ) -> Encoding;
}
Expand description

Cacheable and/or encodable request.

Required Methods§

Source

fn should_skip_cache<CacheT, CacheKeyT>( &self, configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>, ) -> bool

May call cacheable_by_request hook.

Source

fn cache_key_with_hook<CacheT, CacheKeyT>( &self, configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>, ) -> CacheKeyT
where CacheKeyT: CacheKey,

May call cache_key hook.

Source

fn select_encoding( &self, configuration: &MiddlewareEncodingConfiguration, ) -> Encoding

May call encodable_by_request hook.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<RequestBodyT> CacheableEncodableRequest<RequestBodyT> for Request<RequestBodyT>

Source§

fn should_skip_cache<CacheT, CacheKeyT>( &self, configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>, ) -> bool

Source§

fn cache_key_with_hook<CacheT, CacheKeyT>( &self, configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>, ) -> CacheKeyT
where CacheKeyT: CacheKey,

Source§

fn select_encoding( &self, configuration: &MiddlewareEncodingConfiguration, ) -> Encoding

Implementors§