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§
async fn get_size(&self) -> PolarsResult<usize>
Sourceasync fn get_range(&self, range: Range<usize>) -> PolarsResult<MemSlice>
async fn get_range(&self, range: Range<usize>) -> PolarsResult<MemSlice>
§Panics
Panics if range
is not in bounds.
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.