Trait lance_encoding::EncodingsIo
source · pub trait EncodingsIo: Send + Sync {
// Required method
fn submit_request(
&self,
range: Vec<Range<u64>>
) -> BoxFuture<'static, Result<Vec<Bytes>>>;
}
Expand description
A trait for an I/O service
This represents the I/O API that the encoders and decoders need in order to operate. We specify this as a trait so that lance-encodings does not need to depend on lance-io
In general, it is assumed that this trait will be implemented by some kind of “file reader” or “file scheduler”. The encodings here are all limited to accessing a single file.
Required Methods§
sourcefn submit_request(
&self,
range: Vec<Range<u64>>
) -> BoxFuture<'static, Result<Vec<Bytes>>>
fn submit_request( &self, range: Vec<Range<u64>> ) -> BoxFuture<'static, Result<Vec<Bytes>>>
Submit an I/O request
The response must contain a Bytes
object for each range requested even if the underlying
I/O was coalesced into fewer actual requests.
§Arguments
ranges
- the byte ranges to request