pub trait MessageBody: 'static {
// Required methods
fn size(&self) -> BodySize;
fn poll_next_chunk(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Bytes, Rc<dyn Error>>>>;
}Expand description
Interface for types that can be streamed to a peer.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".