spin_sdk::http::conversions

Trait IntoBody

Source
pub trait IntoBody {
    // Required method
    fn into_body(self) -> Vec<u8> ;
}
Expand description

A trait for any type that can be turned into a Response body

Required Methods§

Source

fn into_body(self) -> Vec<u8>

Turn self into a Response body

Implementations on Foreign Types§

Source§

impl IntoBody for &str

Source§

impl IntoBody for ()

Source§

impl IntoBody for String

Source§

impl IntoBody for Vec<u8>

Source§

impl IntoBody for Bytes

Source§

impl<T: IntoBody> IntoBody for Option<T>

Implementors§