Trait ReadDyn

Source
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§

Source

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.

Source

fn read_all_dyn(&mut self) -> BoxedFuture<'_, Result<Buffer>>

The dyn version of Read::read_all

Implementors§

Source§

impl<T: Read + ?Sized> ReadDyn for T