pub trait SputnikBody {
    fn into_form<T: DeserializeOwned>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<T, FormError>> + Send + Sync>>; fn into_json<T: DeserializeOwned>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<T, JsonError>> + Send + Sync>>; }
Available on crate feature hyper_body only.
Expand description

Adds deserialization methods to hyper::Body.

Required Methods

Parses a application/x-www-form-urlencoded request body into a given struct.

Available on crate feature hyper_body_json only.

Attempts to deserialize the request body as JSON.

Implementations on Foreign Types

Available on crate feature hyper_body_json only.

Implementors