pub trait Read:
Unpin
+ Send
+ Sync {
// Required methods
fn open(
&self,
range: BytesRange,
) -> impl Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + MaybeSend;
fn read(
&self,
range: BytesRange,
) -> impl Future<Output = Result<(RpRead, Buffer), Error>> + MaybeSend;
}Expand description
Read is the internal trait used by OpenDAL to read ranges from storage.
Users should not use or import this trait unless they are implementing a Service.
This trait returns impl Future, so it is not object safe. Use ReadDyn when
type erasure is required.
Required Methods§
Sourcefn open(
&self,
range: BytesRange,
) -> impl Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + MaybeSend
fn open( &self, range: BytesRange, ) -> impl Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + MaybeSend
Open a range stream for the given range.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.