spin_sdk::http::conversions

Trait FromBody

Source
pub trait FromBody {
    // Required method
    fn from_body(body: Vec<u8>) -> Self;
}
Expand description

A trait from converting from a body

Required Methods§

Source

fn from_body(body: Vec<u8>) -> Self

Convert from a body into the type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromBody for ()

Source§

fn from_body(_body: Vec<u8>) -> Self

Source§

impl FromBody for Vec<u8>

Source§

fn from_body(body: Vec<u8>) -> Self

Source§

impl FromBody for Bytes

Source§

fn from_body(body: Vec<u8>) -> Self

Implementors§