Skip to main content

Module schema

Module schema 

Source
Expand description

Versioned schema identities, facts, provenance, and declared fingerprints.

This module contains no parser, filesystem, provider, binding, query, or migration dependencies. Trusted values are created only through validating constructors; canonical decoding will use explicit validated wire types.

Re-exports§

pub use crate::managed_scope::ManagedScopeBinding;
pub use crate::managed_scope::ManagedScopeId;
pub use crate::managed_scope::ManagedScopeProfileBinding;
pub use crate::managed_scope::ManagedScopeProfileFingerprint;
pub use crate::managed_scope::ManagedScopeProfileId;
pub use crate::managed_scope::SemanticProfileFingerprint;
pub use crate::schema_delta::ManagedFactSelection;
pub use crate::schema_delta::ManagedSchemaState;
pub use crate::schema_delta::PatchFormatVersion;
pub use crate::schema_delta::SchemaDelta;
pub use crate::schema_delta::SchemaOperation;
pub use crate::schema_delta::SchemaOperationKind;
pub use crate::schema_delta::decode_schema_delta;
pub use crate::schema_delta::encode_schema_delta;
pub use crate::schema_fingerprint::ManagedDeclaredIdentityFingerprint;
pub use crate::schema_fingerprint::ManagedSemanticSchemaFingerprint;
pub use crate::schema_fingerprint::SchemaDocumentSetFingerprint;
pub use crate::schema_fingerprint::SemanticSchemaFingerprint;
pub use crate::semantic_profile::InterfaceKind;
pub use crate::semantic_profile::SemanticProfile;

Structs§

AnnotationFact
An independently identified schema annotation fact.
AnnotationFactId
Identity of an independent annotation fact.
CanonicalValueRange
An exact-domain, non-empty canonical value range.
CanonicalValueSet
A non-empty exact-domain canonical value set.
DeclaredIdentityFingerprint
A domain-safe fingerprint of direct fact identity and meaning.
DeclaredSchema
A validated normalized graph of direct schema facts.
DiagnosticLabel
A secondary source label attached to a schema diagnostic.
DocText
A validated non-empty documentation payload.
DocumentFingerprint
A domain-safe source-document fingerprint.
DocumentId
A normalized, relative, forward-slash schema source identifier.
FunctionBody
Decoded provider-native function body text retained verbatim.
FunctionFact
A function declaration with structured signature and decoded body text.
FunctionParameter
One ordered function parameter.
FunctionReturnElement
One ordered element in a function return signature.
FunctionSignature
A validated ordered function signature.
OwnsFact
A direct ownership fact.
OwnsFactId
Identity of a direct ownership declaration.
PlaysFact
A direct role-playing fact.
PlaysFactId
Identity of a direct role-playing declaration.
RegexPattern
A validated regular-expression payload retained without a regex engine.
RelatesFact
A direct related-role fact, optionally specializing a parent role.
RelatesFactId
Identity of a direct related-role declaration.
SchemaDiagnostic
A stable contract diagnostic enriched with schema source locations.
SchemaDiagnostics
One or more schema diagnostics produced by a fail-closed operation.
SourceSpan
A byte-exact source span with one-based line and column positions.
SourcedSchemaFact
A direct fact paired with the one source span that owns it.
StructFact
A named struct declaration with ordered, non-empty built-in fields.
StructField
One ordered field in a struct declaration.
SubFact
A direct subtype fact.
SubFactId
Identity of a direct subtype edge.
TypeFact
Existence of an entity, relation, or attribute type.
ValueFact
An attribute scalar-domain fact.
ValueFactId
Identity of an attribute value declaration.

Enums§

AnnotationKindId
Stable identity of a schema annotation kind.
AnnotationSubjectId
A structural fact that may carry an independent annotation.
CanonicalValueRangeViolation
Precise validation failure for canonical range bounds.
CanonicalValueSetViolation
Precise validation failure for a raw @values member sequence.
CollectionMode
The closed collection semantics of an ownership or related-role fact.
FunctionReturnMode
Native function return cardinality and ordered shape.
SchemaAnnotationValue
A closed, kind-safe schema annotation payload.
SchemaFact
A validated, atomic direct schema fact.
SchemaFactId
Stable identity of any Phase 2 schema fact.
TypeReference
A type reference used by a function signature.

Constants§

MAX_DOCUMENT_ID_BYTES
Maximum UTF-8 length of a normalized schema document identifier.

Functions§

decode_declared_schema
Decode canonical bytes through private wire DTOs and every fact/schema constructor.
encode_declared_schema
Encode only a constructor-validated declared schema as canonical JSON.