Skip to main content

ant_types/
lib.rs

1//! Record types of the open Antares (`.ant`) interchange format.
2//!
3//! Everything that can appear in a `.ant` file lives here, one module
4//! per record plane:
5//!
6//! - [`graph`] — [`Vertex`] and [`Edge`], with typed properties and
7//!   optional bitemporal validity.
8//! - [`observation`] — append-only, source-bound atomic facts.
9//! - [`evidence`] — the source material observations and edges cite.
10//! - [`belief`] — versioned inferred state derived from observations.
11//! - [`schema`] — OpenSPG-compatible type declarations.
12//! - [`author`] — the provenance stamp records can carry.
13//!
14//! Property values are typed at SQL fidelity ([`PropertyValue`]).
15//! Legacy scalars stay bare JSON on the wire; the typed additions
16//! (decimal, date, time, timestamp, uuid, bytes, sized ints, arrays)
17//! travel in a tagged `{"$ant": ..., "v": ...}` envelope, so a plain
18//! JSON document with a `$ant` field still round-trips as a document.
19//! [`Decimal`] is exact — an i128 of unscaled digits plus a scale,
20//! never `f64` — so `DECIMAL`/`NUMERIC` columns survive digit for
21//! digit.
22//!
23//! The container that carries these records (compression, manifest,
24//! trailer, hashing) is the `antares-format` crate; this crate is just
25//! the record vocabulary.
26
27pub mod author;
28pub mod belief;
29pub mod decimal;
30pub mod error;
31pub mod evidence;
32pub mod graph;
33pub mod ids;
34pub mod observation;
35pub mod property;
36pub mod schema;
37
38pub use author::{AuthorStamp, SubjectType, TokenId, UserId};
39pub use belief::{Belief, BeliefId};
40pub use decimal::Decimal;
41pub use error::CoreError;
42pub use evidence::{Evidence, EvidenceId};
43pub use graph::{Edge, PropertyValue, Vertex};
44pub use ids::{EdgeId, Namespace, ProjectId, TenantId, TypeName, VertexId};
45pub use observation::{Observation, ObservationId};
46pub use schema::*;