Skip to main content

RangeRead

Trait RangeRead 

Source
pub trait RangeRead {
    // Required methods
    fn len(&mut self) -> Result<u64>;
    fn read_range(&mut self, offset: u64, buf: &mut [u8]) -> Result<()>;
}
Expand description

A random-access byte source addressed by absolute offsets.

Implementations back crate::CopcRangeReader, which fetches only the header, the hierarchy pages a query needs, and the selected point chunks.

Required Methods§

Source

fn len(&mut self) -> Result<u64>

Total length of the source in bytes.

Source

fn read_range(&mut self, offset: u64, buf: &mut [u8]) -> Result<()>

Fill buf with the bytes at offset..offset + buf.len().

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RangeRead for File

Source§

fn len(&mut self) -> Result<u64>

Source§

fn read_range(&mut self, offset: u64, buf: &mut [u8]) -> Result<()>

Implementors§