Trait sputnik::hyper_body::SputnikBody
source · [−]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.