pub trait Body {
type Data: IoBuf;
type Error;
// Required methods
fn next_data(
&mut self,
) -> impl Future<Output = Option<Result<Self::Data, Self::Error>>>;
fn stream_hint(&self) -> StreamHint;
}
Required Associated Types§
Required Methods§
fn next_data( &mut self, ) -> impl Future<Output = Option<Result<Self::Data, Self::Error>>>
fn stream_hint(&self) -> StreamHint
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.