pub trait DataSource {
// Required methods
fn schema(&self) -> &[ColumnSchema];
fn row_count(&self) -> usize;
fn read_range(&self, range: Range<usize>) -> Result<Dataset, DataError>;
// Provided methods
fn revision(&self) -> u64 { ... }
fn cancel(&self) { ... }
}Available on crate feature
data only.Expand description
A lazy, paged table. A source can be backed by a file, a database, a channel, or a thread; the trait is synchronous and never pulls in an async runtime.
§Example
use crisol_core::data::DataSource;Required Methods§
Sourcefn schema(&self) -> &[ColumnSchema]
fn schema(&self) -> &[ColumnSchema]
The column schema.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl DataSource for ArrowSource
impl DataSource for ChannelSource
impl DataSource for CsvSource
impl DataSource for MemorySource
impl DataSource for ParquetSource
impl DataSource for PolarsSource
Available on crate feature
polars only.