pub trait AsyncFileReader: Send {
// Required method
fn get_bytes(
&mut self,
range: Range<u64>,
) -> BoxFuture<'_, Result<Bytes, AvroError>>;
// Provided method
fn get_byte_ranges(
&mut self,
ranges: Vec<Range<u64>>,
) -> BoxFuture<'_, Result<Vec<Bytes>, AvroError>> { ... }
}Expand description
The asynchronous interface used by super::AsyncAvroFileReader to read avro files
Notes:
-
There is a default implementation for types that implement [
AsyncRead] and [AsyncSeek], for exampletokio::fs::File. -
super::AvroObjectReader, available when theobject_storecrate feature is enabled, implements this interface forObjectStore.
Required Methods§
Provided Methods§
Trait Implementations§
Implementations on Foreign Types§
Source§impl AsyncFileReader for Box<dyn AsyncFileReader + '_>
This allows Box<dyn AsyncFileReader + ’_> to be used as an AsyncFileReader,
impl AsyncFileReader for Box<dyn AsyncFileReader + '_>
This allows Box<dyn AsyncFileReader + ’_> to be used as an AsyncFileReader,