Skip to main content

StreamRead

Trait StreamRead 

Source
pub trait StreamRead:
    Send
    + Sync
    + Unpin
    + 'static {
    // Required method
    fn open(
        &self,
        range: BytesRange,
    ) -> impl Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>)>> + MaybeSend;
}
Expand description

StreamRead is used to implement oio::Read based on native range streams.

Services that implement StreamRead only need to expose their native open(range) operation. StreamReader will provide the complete oio::Read contract.

Required Methods§

Source

fn open( &self, range: BytesRange, ) -> impl Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>)>> + MaybeSend

Open a stream to read the requested range.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§