Type Alias CachedResponseRef

Source
pub type CachedResponseRef = Arc<CachedResponse>;
Expand description

Common reference type for CachedResponse.

Aliased Type§

pub struct CachedResponseRef { /* private fields */ }

Trait Implementations§

Source§

impl ToTranscodingResponse for CachedResponseRef

Source§

async fn to_transcoding_response<ResponseBodyT, CacheT, CacheKeyT>( self, encoding: &Encoding, is_new: bool, cache: CacheT, key: CacheKeyT, configuration: &EncodingConfiguration, ) -> Response<TranscodingBody<ResponseBodyT>>
where ResponseBodyT: 'static + Body + From<Bytes> + Send + Unpin, ResponseBodyT::Data: From<Bytes>, ResponseBodyT::Error: Into<CapturedError>, CacheT: Cache<CacheKeyT>, CacheKeyT: CacheKey,

To a Response with a TranscodingBody.

Will update the cache if we are modified.

If we encounter an error will return a response with StatusCode::INTERNAL_SERVER_ERROR.