panproto_schema/lib.rs
1//! # panproto-schema
2//!
3//! Schema representation for panproto.
4//!
5//! A schema is a model of a protocol's schema theory GAT (from
6//! `panproto-gat`). This crate provides:
7//!
8//! - **[`Schema`]**: The core schema data structure with precomputed
9//! adjacency indices for efficient graph traversal.
10//! - **[`SchemaBuilder`]**: A fluent, protocol-aware builder that
11//! validates each element as it is added.
12//! - **[`Protocol`]**: Configuration describing which schema/instance
13//! theories and edge rules a data format uses.
14//! - **[`normalize`]**: Ref-chain collapse for schemas with `Ref` vertices.
15//! - **[`validate`]**: Post-hoc validation of a schema against a protocol.
16
17mod builder;
18mod error;
19mod normalize;
20mod protocol;
21mod schema;
22mod validate;
23
24pub use builder::SchemaBuilder;
25pub use error::{SchemaError, ValidationError};
26pub use normalize::normalize;
27pub use protocol::{EdgeRule, Protocol};
28pub use schema::{Constraint, Edge, HyperEdge, Schema, Vertex};
29pub use validate::validate;