orbital-data 0.1.3

Shared typed dataset primitives (Dataset, DataRecord, DataValue) for Orbital tables and charts
Documentation

Shared typed dataset primitives for Orbital tables and charts.

This crate provides [Dataset], [DataRecord], and [DataValue] — the canonical data model shared by orbital-datatable and orbital-charts. Because it has no UI or framework dependencies, any crate in the workspace can depend on it without introducing cycles.

Example

use std::collections::HashMap;
use orbital_data::{DataRecord, DataSchema, DataValue, Dataset, FieldDef};

let schema = DataSchema::new(vec![
    FieldDef::text("name", "Name"),
    FieldDef::text("role", "Role"),
]);
let record = DataRecord::new(
    "1",
    HashMap::from([
        ("name".into(), DataValue::Text("Ada".into())),
        ("role".into(), DataValue::Text("Admin".into())),
    ]),
);
let dataset = Dataset::from_records(schema, vec![record]);
assert_eq!(dataset.records.len(), 1);