pub trait ToTranscodingResponse {
// Required method
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> + Send,
ResponseBodyT::Error: Into<CapturedError>,
CacheT: Cache<CacheKeyT>,
CacheKeyT: CacheKey;
}
Expand description
To transcoding response.
Required Methods§
Sourceasync fn to_transcoding_response<ResponseBodyT, CacheT, CacheKeyT>(
self,
encoding: &Encoding,
is_new: bool,
cache: CacheT,
key: CacheKeyT,
configuration: &EncodingConfiguration,
) -> Response<TranscodingBody<ResponseBodyT>>
async fn to_transcoding_response<ResponseBodyT, CacheT, CacheKeyT>( self, encoding: &Encoding, is_new: bool, cache: CacheT, key: CacheKeyT, configuration: &EncodingConfiguration, ) -> Response<TranscodingBody<ResponseBodyT>>
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.
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.