httpcodec

Trait BodyEncode

Source
pub trait BodyEncode: Encode {
    // Provided method
    fn update_header(&self, header: &mut HeaderMut<'_>) -> Result<()> { ... }
}
Expand description

BodyEncode is used for representing HTTP body encoders.

Provided Methods§

Source

fn update_header(&self, header: &mut HeaderMut<'_>) -> Result<()>

This method is called before starting to encode a HTTP body.

It is used for adjusting HTTP header by using the encoder specific information.

The default implementation does nothing.

Implementations on Foreign Types§

Source§

impl<'a, T: ?Sized + BodyEncode> BodyEncode for &'a mut T

Source§

fn update_header(&self, header: &mut HeaderMut<'_>) -> Result<()>

Source§

impl<T: ?Sized + BodyEncode> BodyEncode for Box<T>

Source§

fn update_header(&self, header: &mut HeaderMut<'_>) -> Result<()>

Implementors§