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§
Sourcefn should_skip_cache<CacheT, CacheKeyT>(
&self,
configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>,
) -> bool
fn should_skip_cache<CacheT, CacheKeyT>( &self, configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>, ) -> bool
May call cacheable_by_request
hook.
Sourcefn cache_key_with_hook<CacheT, CacheKeyT>(
&self,
configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>,
) -> CacheKeyTwhere
CacheKeyT: CacheKey,
fn cache_key_with_hook<CacheT, CacheKeyT>(
&self,
configuration: &MiddlewareCachingConfiguration<RequestBodyT, CacheT, CacheKeyT>,
) -> CacheKeyTwhere
CacheKeyT: CacheKey,
May call cache_key
hook.
Sourcefn select_encoding(
&self,
configuration: &MiddlewareEncodingConfiguration,
) -> Encoding
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", so this trait is not object safe.