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§

source

fn try_as_body(&self) -> Result<Body, Status>

Try convert the reply into a body or return an error status.

Implementors§

source§

impl<T> TryAsBody for Twhere T: Archive + Serialize<AllocSerializer<SCRATCH_SPACE>>,