pub trait ReadDyn:
Unpin
+ Send
+ Sync {
// Required methods
fn open_dyn(
&self,
range: BytesRange,
) -> BoxedFuture<'_, Result<(RpRead, Box<dyn ReadStreamDyn>)>>;
fn read_dyn(
&self,
range: BytesRange,
) -> BoxedFuture<'_, Result<(RpRead, Buffer)>>;
}Expand description
ReadDyn is the dyn-compatible adapter for Read.
It boxes returned futures to support Box<dyn ReadDyn>, adding one allocation
per call at the type-erasure boundary.
Required Methods§
Sourcefn open_dyn(
&self,
range: BytesRange,
) -> BoxedFuture<'_, Result<(RpRead, Box<dyn ReadStreamDyn>)>>
fn open_dyn( &self, range: BytesRange, ) -> BoxedFuture<'_, Result<(RpRead, Box<dyn ReadStreamDyn>)>>
The dyn version of Read::open.
Sourcefn read_dyn(
&self,
range: BytesRange,
) -> BoxedFuture<'_, Result<(RpRead, Buffer)>>
fn read_dyn( &self, range: BytesRange, ) -> BoxedFuture<'_, Result<(RpRead, Buffer)>>
The dyn version of Read::read.