pub trait PositionRead:
Send
+ Sync
+ Unpin
+ 'static {
type Handle: Send + Sync + Unpin + 'static;
// Required methods
fn open(
&self,
) -> impl Future<Output = Result<Self::Handle, Error>> + MaybeSend;
fn read_at(
handle: &Self::Handle,
offset: u64,
size: usize,
) -> impl Future<Output = Result<Buffer, Error>> + MaybeSend;
}Expand description
PositionRead is used to implement oio::Read based on positioned reads.
Services that implement PositionRead create a positioned read handle lazily
and must support position-independent reads on that handle. size is the
maximum number of bytes to read, and implementations may return fewer bytes.
Returning an empty buffer means EOF.
Required Associated Types§
Required Methods§
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.