Trait BodyEncodeExt

Source
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§

Source

fn decode_content( self, content_encoding: String, ) -> impl Future<Output = Result<Bytes, Self::EncodeDecodeError>>

Consumes body and returns decodec content

Source

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.

Implementors§