orbital-data 0.1.1

Shared typed dataset primitives (Dataset, DataRecord, DataValue) for Orbital tables and charts
Documentation
  • Coverage
  • 41.82%
    23 out of 55 items documented1 out of 1 items with examples
  • Size
  • Source code size: 30.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • unified-field-dev/orbital
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • deathbreakfast

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);