spin_sdk::http::conversions

Trait TryIntoBody

Source
pub trait TryIntoBody {
    type Error;

    // Required method
    fn try_into_body(self) -> Result<Vec<u8>, Self::Error>;
}
Expand description

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

Required Associated Types§

Source

type Error

The type of error if the conversion fails

Required Methods§

Source

fn try_into_body(self) -> Result<Vec<u8>, Self::Error>

Turn self into an Error

Implementors§