Skip to main content

Crate ant_types

Crate ant_types 

Source
Expand description

Record types of the open Antares (.ant) interchange format.

Everything that can appear in a .ant file lives here, one module per record plane:

  • graphVertex and Edge, with typed properties and optional bitemporal validity.
  • observation — append-only, source-bound atomic facts.
  • evidence — the source material observations and edges cite.
  • belief — versioned inferred state derived from observations.
  • schema — OpenSPG-compatible type declarations.
  • author — the provenance stamp records can carry.

Property values are typed at SQL fidelity (PropertyValue). Legacy scalars stay bare JSON on the wire; the typed additions (decimal, date, time, timestamp, uuid, bytes, sized ints, arrays) travel in a tagged {"$ant": ..., "v": ...} envelope, so a plain JSON document with a $ant field still round-trips as a document. Decimal is exact — an i128 of unscaled digits plus a scale, never f64 — so DECIMAL/NUMERIC columns survive digit for digit.

The container that carries these records (compression, manifest, trailer, hashing) is the antares-format crate; this crate is just the record vocabulary.

Re-exports§

pub use author::AuthorStamp;
pub use author::SubjectType;
pub use author::TokenId;
pub use author::UserId;
pub use belief::Belief;
pub use belief::BeliefId;
pub use decimal::Decimal;
pub use error::CoreError;
pub use evidence::Evidence;
pub use evidence::EvidenceId;
pub use graph::Edge;
pub use graph::PropertyValue;
pub use graph::Vertex;
pub use ids::EdgeId;
pub use ids::Namespace;
pub use ids::ProjectId;
pub use ids::TenantId;
pub use ids::TypeName;
pub use ids::VertexId;
pub use observation::Observation;
pub use observation::ObservationId;
pub use schema::*;

Modules§

author
Record authorship — the provenance stamp carried on insight-plane records.
belief
Antares-native beliefs.
decimal
Exact decimal (SQL DECIMAL/NUMERIC, money).
error
Domain-layer error type shared by every record plane.
evidence
Antares-native first-class evidence.
graph
Graph data model: Vertex, Edge, PropertyValue, SubGraph.
ids
Identifier newtypes: tenant, project, vertex, edge, namespace, type name. Each is a thin wrapper so ids of different planes can’t be mixed up silently.
observation
Antares-native observations.
property
PropertyValue — the typed value of a vertex/edge property.
schema
Schema records: the OpenSPG-compatible type declarations that a .ant file can carry as schema_type records.