Skip to main content

IntoBody

Trait IntoBody 

Source
pub trait IntoBody {
    type IntoBody: Body;

    // Required method
    fn into_body(self) -> Self::IntoBody;
}
Expand description

Conversion into a Body.

NOTE: We have our own trait over wstd::http::body::IntoBody to avoid possible future conflicts when implementing IntoResponse for Result<B: IntoBody, HttpError>.

Required Associated Types§

Source

type IntoBody: Body

What type of Body are we turning this into?

Required Methods§

Source

fn into_body(self) -> Self::IntoBody

Convert into Body.

Implementations on Foreign Types§

Source§

impl IntoBody for &str

Source§

impl IntoBody for &[u8]

Source§

impl IntoBody for ()

Source§

impl IntoBody for String

Source§

impl IntoBody for Vec<u8>

Implementors§