Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

List of Datasets

All built-in dataset types, their feature flags, and typical use cases.

Core datasets (no feature flags)

TypeLoad/Save typesDescription
Param<T>T / ()Read-only parameter. Error: Infallible.
CellDataset<T>T / Tno_std intermediate storage. T: Copy only.

std datasets

TypeFeatureLoad/Save typesDescription
MemoryDataset<T>stdT / TThread-safe in-memory storage via Arc<Mutex<_>>.
TextDatasetstdString / StringReads/writes plain text files.
CacheDataset<D>stdD::LoadItem / D::SaveItemCaching wrapper for any dataset.

File format datasets

TypeFeatureLoad/Save typesDescription
PolarsCsvDatasetpolarsDataFrame / DataFrameCSV files via Polars. Configurable separator, header, etc.
PolarsParquetDatasetpolarsDataFrame / DataFrameParquet files via Polars.
PolarsExcelDatasetpolarsDataFrame / —Excel files via fastexcel. Read-only.
JsonDatasetjsonserde_json::Value / serde_json::ValueJSON files.
YamlDatasetyamlVec<Yaml> / Vec<Yaml>YAML files using yaml_rust2.
PlotlyDatasetplotlyserde_json::Value / serde_json::ValuePlotly charts. Saves .json + .html. Custom html() for viz.
ImageDatasetimageDynamicImage / DynamicImageImage files via the image crate.

Partitioned datasets

TypeFeatureLoad/Save typesDescription
PartitionedDataset<D>polarsHashMap<String, D::LoadItem> / HashMap<String, D::SaveItem>Directory of files, eagerly loaded.
LazyPartitionedDataset<D>polarsHashMap<String, Lazy<D::LoadItem>> / HashMap<String, D::SaveItem>Directory of files, lazily loaded on demand.

Hardware datasets (no_std)

TypeFeatureLoad/Save typesDescription
RegisterDataset<T>T / TVolatile memory-mapped register. T: Copy.
GpioDatasetbool / boolSingle GPIO pin within a memory-mapped register.

Common traits

All file-backed datasets that support PartitionedDataset implement FileDataset:

pub trait FileDataset: Dataset + Clone {
    fn path(&self) -> &str;
    fn set_path(&mut self, path: &str);
}

Implementors: PolarsCsvDataset, PolarsParquetDataset, PolarsExcelDataset, TextDataset, JsonDataset.