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.

Structs§

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).
Protocol
Identifies the schema and instance theories for a data-format protocol, together with structural well-formedness rules.
Schema
A schema: a model of the protocol’s schema theory.
SchemaBuilder
A builder for incrementally constructing a validated Schema.
Vertex
A schema vertex.

Enums§

SchemaError
Errors that can occur during schema construction and validation.
ValidationError
An error found during schema validation against a protocol.

Functions§

normalize
Collapse ref-chains in a schema into direct edges.
validate
Validate a schema against a protocol’s structural rules.