persistant_core/lib.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! PersistAnt's vocabulary and verification model. No I/O, no third-party dependencies.
3//!
4//! A **capability** is a boolean for one `(backend, version, config)`; it is off until an automated
5//! test passed (`docs/DESIGN-KINDS.md` §2.1). This crate holds the pieces every kind shares:
6//!
7//! - [`CapabilityId`]: a validated string id, owned here, never changing meaning;
8//! - [`Config`]: the `k=v;k=v` facts a gate can read at open;
9//! - [`Row`] and [`Matrix`]: the recorded fact (§2.4) and the lookup the gate performs;
10//! - [`Verdict`]: the four test outcomes, and the rule that an `on` row needs both controls;
11//! - [`vocabulary::SEED`]: the seed ids with their written contracts (all off until tested).
12
13mod config;
14mod id;
15mod matrix;
16mod row;
17mod verdict;
18pub mod vocabulary;
19
20pub use config::{Config, ConfigError};
21pub use id::{CapabilityId, IdError};
22pub use matrix::{Lookup, Matrix};
23pub use row::{ParseError, Reason, Row};
24pub use verdict::{Controls, ControlsNotRun, Verdict};
25
26/// The crate version, as declared in the workspace manifest.
27pub const VERSION: &str = env!("CARGO_PKG_VERSION");