polars_io::utils::byte_source

Trait ByteSource

Source
pub trait ByteSource: Send + Sync {
    // Required methods
    async fn get_size(&self) -> PolarsResult<usize>;
    async fn get_range(&self, range: Range<usize>) -> PolarsResult<MemSlice>;
    async fn get_ranges(
        &self,
        ranges: &[Range<usize>],
    ) -> PolarsResult<Vec<MemSlice>>;
}
Available on crate feature cloud only.

Required Methods§

Source

async fn get_size(&self) -> PolarsResult<usize>

Source

async fn get_range(&self, range: Range<usize>) -> PolarsResult<MemSlice>

§Panics

Panics if range is not in bounds.

Source

async fn get_ranges( &self, ranges: &[Range<usize>], ) -> PolarsResult<Vec<MemSlice>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§