Skip to main content

ByteSource

Trait ByteSource 

Source
pub trait ByteSource: Send + Sync {
    // Required methods
    async fn get_size(&self) -> Result<usize, PolarsError>;
    async fn get_range(
        &self,
        range: Range<usize>,
    ) -> Result<Buffer<u8>, PolarsError>;
    async fn get_ranges(
        &self,
        ranges: &mut [Range<usize>],
    ) -> Result<HashMap<usize, Buffer<u8>, RandomState>, PolarsError>;
}

Required Methods§

Source

async fn get_size(&self) -> Result<usize, PolarsError>

Source

async fn get_range( &self, range: Range<usize>, ) -> Result<Buffer<u8>, PolarsError>

§Panics

Panics if range is not in bounds.

Source

async fn get_ranges( &self, ranges: &mut [Range<usize>], ) -> Result<HashMap<usize, Buffer<u8>, RandomState>, PolarsError>

Note: This will mutably sort ranges for coalescing.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§