Skip to main content

Crate persistant_core

Crate persistant_core 

Source
Expand description

PersistAnt’s vocabulary and verification model. No I/O, no third-party dependencies.

A capability is a boolean for one (backend, version, config); it is off until an automated test passed (docs/DESIGN-KINDS.md §2.1). This crate holds the pieces every kind shares:

  • CapabilityId: a validated string id, owned here, never changing meaning;
  • Config: the k=v;k=v facts a gate can read at open;
  • Row and Matrix: the recorded fact (§2.4) and the lookup the gate performs;
  • Verdict: the four test outcomes, and the rule that an on row needs both controls;
  • vocabulary::SEED: the seed ids with their written contracts (all off until tested).

Modules§

bench
The kind-agnostic half of backend benchmarking stage 3 (speed): the environment a figure was taken in, timing statistics, the data file, and the comparison that never crosses machines. The kinds (persistant_kv::speed, persistant_blob::speed) own their workloads and how they are timed; they produce SpeedRows and nothing here knows what a key-value store or a blob store is.
choose
Stage 4 of backend benchmarking, kind-agnostic: “best backend for X”, as a ranked list with its evidence. The kinds (persistant_kv::choose, persistant_blob::choose) supply their contract leaf ids, their workload ids and a table of what their backends declare about durability; the logic is here, once.
vocabulary
The seed vocabulary: the ids of docs/DESIGN-KINDS.md §2.2 that are not rel.* constructs (those are UniSQL’s leaf ids), each with its written contract.

Structs§

CapabilityId
A capability id such as kv.prefix_list, cast.to_uuid or fn:max.
Config
Facts a gate can read at open, as k=v;k=v (a locale, a collation, schema=none).
Controls
Whether the two controls of a test ran as they must.
ControlsNotRun
An on was requested without both controls: the test proves nothing.
Matrix
The recorded facts of one or more matrix files, and the lookup the gate performs.
Row
One recorded fact: a test ran, for this subject, on this backend, version and config.

Enums§

ConfigError
Why a k=v;k=v string is not a Config.
IdError
Why a string is not a capability id.
Lookup
What the matrix says about one capability on one (backend, version, config).
ParseError
Why matrix text could not be read.
Reason
Why a capability is off.
Verdict
The result of running one capability’s test, before anything is recorded.

Constants§

VERSION
The crate version, as declared in the workspace manifest.