Skip to main content

Crate fastsim_schema

Crate fastsim_schema 

Source
Expand description

Vehicle database schema for the fastsim-vehicles repository.

This crate provides serialization/deserialization of vehicle identification paths into structured data, along with index management and WebAssembly bindings. Currently supports schema version 1.

Structs§

IndexEntryV1
A single entry in the vehicle index (i.e. vehicles.jsonl).
QueryV1
Structured search constraints over an IndexEntryV1 slice.
VehicleSchemaV1
Database organizational schema version 1 for the fastsim-vehicles repository.

Enums§

VehicleSchema
VehicleSchemaError
VehicleSchemaV1Error

Constants§

DEFAULT_DB_URL

Functions§

read_jsonl_v1
Parse JSON Lines text (as read from vehicles.jsonl, or fetched client-side in the browser widget) into entries.
search_v1
Filter entries against query, returning references to matches in their original order.
write_jsonl_v1
Serialize a slice of entries into JSON Lines, one entry per line in the given order, written to writer. Callers wanting a specific ordering (e.g. sorted by path) should sort entries beforehand — this function preserves input order rather than imposing one.