pub trait BodyEncodeExt: BodyExt {
type EncodeDecodeError;
// Required methods
fn decode_content(
self,
content_encoding: String,
) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>;
fn encode_content(
self,
accept_encoding: String,
) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>;
}
Required Associated Types§
Required Methods§
Sourcefn decode_content(
self,
content_encoding: String,
) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>
fn decode_content( self, content_encoding: String, ) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>
Consumes body and returns decodec content
Sourcefn encode_content(
self,
accept_encoding: String,
) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>
fn encode_content( self, accept_encoding: String, ) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>
Consumes body and returns encoded content
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.