Skip to main content

OutgoingBody

Trait OutgoingBody 

Source
pub trait OutgoingBody {
    type Error: Into<IntoHttpError>;

    // Required method
    fn try_into_buf<T: Default + BufMut + AsRef<[u8]>>(
        self,
    ) -> Result<T, Self::Error>;
}
Available on crate feature api only.
Expand description

HTTP message body pre-serialization.

Required Associated Types§

Source

type Error: Into<IntoHttpError>

The type of error that can happen in try_info_buf.

Required Methods§

Source

fn try_into_buf<T: Default + BufMut + AsRef<[u8]>>( self, ) -> Result<T, Self::Error>

Turn self into a byte buffer (copying a raw body or serializing a JSON one).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§