pub trait ReadDyn:
Unpin
+ Send
+ Sync {
// Required methods
fn open_dyn(
&self,
range: BytesRange,
) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + Send + '_>>;
fn read_dyn(
&self,
range: BytesRange,
) -> Pin<Box<dyn Future<Output = Result<(RpRead, Buffer), Error>> + Send + '_>>;
}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,
) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + Send + '_>>
fn open_dyn( &self, range: BytesRange, ) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + Send + '_>>
The dyn version of Read::open.