pub trait TryFromBody {
type Error: IntoResponse;
// Required method
fn try_from_body(body: Vec<u8>) -> Result<Self, Self::Error>
where Self: Sized;
}Expand description
A trait for converting from a body or failing
Required Associated Types§
Sourcetype Error: IntoResponse
type Error: IntoResponse
The error encountered if conversion fails
Required Methods§
Implementations on Foreign Types§
Source§impl TryFromBody for String
impl TryFromBody for String
Source§impl<T: TryFromBody> TryFromBody for Option<T>
impl<T: TryFromBody> TryFromBody for Option<T>
Implementors§
Source§impl<T: DeserializeOwned> TryFromBody for Json<T>
Available on crate feature json only.
impl<T: DeserializeOwned> TryFromBody for Json<T>
Available on crate feature
json only.