Skip to main content

Crate panproto_schema

Crate panproto_schema 

Source
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 with Ref vertices.
  • 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§

CoercionSpec
Specification of a coercion between two value kinds.
Constraint
A constraint on a vertex.
Edge
A binary edge between two vertices.
EdgeRule
A well-formedness rule for edges of a given kind.
HyperEdge
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.
RecursionPoint
A recursion point (fixpoint marker) in the schema.
Schema
A schema: a model of the protocol’s schema theory.
SchemaBuilder
A builder for incrementally constructing a validated Schema.
SchemaMorphism
An explicit schema morphism (functor F: S → T).
SchemaOverlap
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§

SchemaError
Errors that can occur during schema construction and validation.
UsageMode
Use-counting mode for an edge.
ValidationError
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.