Expand description
§panproto-schema
Schema representation for panproto.
A schema is a model of a protocol’s schema theory GAT (from
panproto-gat). This crate provides:
Schema: The core schema data structure with precomputed adjacency indices for efficient graph traversal.SchemaBuilder: A fluent, protocol-aware builder that validates each element as it is added.Protocol: Configuration describing which schema/instance theories and edge rules a data format uses.normalize: Ref-chain collapse for schemas withRefvertices.validate: Post-hoc validation of a schema against a protocol.
Modules§
- serde_
helpers - Custom serde helpers for JSON-compatible serialization of complex map keys.
Structs§
- Coercion
Spec - Specification of a coercion between two value kinds.
- Constraint
- A constraint on a vertex.
- Edge
- A binary edge between two vertices.
- Edge
Rule - A well-formedness rule for edges of a given kind.
- Hyper
Edge - A hyper-edge (present only when the schema theory includes
ThHypergraph). - Ordering
- An ordering annotation on an edge.
- Protocol
- Identifies the schema and instance theories for a data-format protocol, together with structural well-formedness rules.
- Recursion
Point - A recursion point (fixpoint marker) in the schema.
- Schema
- A schema: a model of the protocol’s schema theory.
- Schema
Builder - A builder for incrementally constructing a validated
Schema. - Schema
Morphism - An explicit schema morphism (functor F: S → T).
- Schema
Overlap - Specifies which elements of two schemas are identified (shared).
- Span
- A span connecting two vertices through a common source.
- Variant
- A variant in a coproduct (sum type / union).
- Vertex
- A schema vertex.
Enums§
- Schema
Error - Errors that can occur during schema construction and validation.
- Usage
Mode - Use-counting mode for an edge.
- Validation
Error - An error found during schema validation against a protocol.
Functions§
- normalize
- Collapse ref-chains in a schema into direct edges.
- schema_
pushout - Compute the pushout (colimit) of two schemas along their overlap.
- validate
- Validate a schema against a protocol’s structural rules.