pub trait ChunkReader {
type T: Read;
// Required methods
fn len(&self) -> u64;
fn get_read(&self, offset_from_start: u64) -> Result<Self::T>;
// Provided method
fn get_bytes(&self, offset_from_start: u64, length: u64) -> Result<Bytes> { ... }
}
Expand description
Primary source used for reading required bytes for operations.
Required Associated Types§
Required Methods§
Provided Methods§
Implementations on Foreign Types§
Source§impl ChunkReader for File
impl ChunkReader for File
Source§fn get_read(&self, offset_from_start: u64) -> Result<Self::T>
fn get_read(&self, offset_from_start: u64) -> Result<Self::T>
Care needs to be taken when using this simultaneously as underlying file descriptor is the same and will be affected by other invocations.
See File::try_clone()
for more details.