Trait datacake_rpc::RequestContents
source · pub trait RequestContents {
type Content: Send + Sized + 'static;
// Required method
fn from_body<'async_trait>(
body: Body
) -> Pin<Box<dyn Future<Output = Result<Self::Content, Status>> + Send + 'async_trait>>
where Self: 'async_trait;
}Expand description
The deserializer trait for converting the request body into the desired type specified by Self::Content.
This trait is automatically implemented for the Body type and any type implementing rkyv’s (de)serializer traits.