Trait datacake_rpc::TryAsBody
source · pub trait TryAsBody {
// Required method
fn try_as_body(&self) -> Result<Body, Status>;
}Expand description
The serializer trait for converting replies into hyper bodies using a reference to self.
This will work for most implementations but if you want to stream hyper bodies for example, you cannot implement this trait.
Required Methods§
sourcefn try_as_body(&self) -> Result<Body, Status>
fn try_as_body(&self) -> Result<Body, Status>
Try convert the reply into a body or return an error status.