pub trait ChunkReader: Length + Send + Sync {
    type T: Read + Send;

    fn get_read(&self, start: u64, length: usize) -> Result<Self::T>;

    fn get_bytes(&self, start: u64, length: usize) -> Result<Bytes> { ... }
}
Expand description

The ChunkReader trait generates readers of chunks of a source. For a file system reader, each chunk might contain a clone of File bounded on a given range. For an object store reader, each read can be mapped to a range request.

Required Associated Types

Required Methods

Get a serially readable slice of the current reader This should fail if the slice exceeds the current bounds

Provided Methods

Get a range as bytes This should fail if the exact number of bytes cannot be read

Implementations on Foreign Types

Implementors