pub trait ReadDyn: Unpin + Send + Sync {
// Required methods
fn read_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>;
fn read_all_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>;
}
Expand description
ReadDyn is the dyn version of Read
make it possible to use as
Box<dyn ReadDyn>
.
Required Methods§
sourcefn read_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>
fn read_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>
The dyn version of Read::read
.
This function returns a boxed future to make it object safe.
sourcefn read_all_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>
fn read_all_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>
The dyn version of Read::read_all