Trait parquet::file::reader::ChunkReader

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

    // Required methods
    fn get_read(&self, start: u64) -> 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 more information see File::try_clone

Required Associated Types§

Required Methods§

source

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

Get a Read starting at the provided file offset

Subsequent or concurrent calls to Self::get_read or Self::get_bytes may side-effect on previously returned Self::T. Care should be taken to avoid this

See File::try_clone for more information

source

fn get_bytes(&self, start: u64, length: usize) -> Result<Bytes>

Get a range as bytes

Concurrent calls to Self::get_bytes may result in interleaved output

See File::try_clone for more information

Implementations on Foreign Types§

source§

impl ChunkReader for Bytes

§

type T = Reader<Bytes>

source§

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

source§

fn get_bytes(&self, start: u64, length: usize) -> Result<Bytes>

source§

impl ChunkReader for File

§

type T = BufReader<File>

source§

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

source§

fn get_bytes(&self, start: u64, length: usize) -> Result<Bytes>

Implementors§