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§
Required Methods§
Implementors§
Source§impl<B> TryIntoBody for Bwhere
B: IntoBody,
impl<B> TryIntoBody for Bwhere
B: IntoBody,
type Error = Infallible
Source§impl<T: Serialize> TryIntoBody for Json<T>
Available on crate feature json only.
impl<T: Serialize> TryIntoBody for Json<T>
Available on crate feature
json only.