Skip to main content

Module codes

Module codes 

Source
Expand description

Diagnostic codes emitted by check_conformance.

Exposed as a module of pub const &str slugs so downstream tools (lint UIs, doc generators) can reference them without matching on string literals.

Constants§

ARITY_ONE
A crate::Multiplicity::One slot did not carry exactly one child.
ARITY_OPTIONAL
A crate::Multiplicity::Optional slot carried more than one child.
CHILD_AS_FIELD
A child slot appeared under fields (structural mismatch).
DUPLICATE_CHILD
A child slot name appeared more than once.
DUPLICATE_FIELD
A field name appeared more than once.
FIELD_AS_CHILD
A payload field appeared under children (structural mismatch).
FIELD_TYPE
A payload field’s value could not be converted to the target Rust type (serde deserialization failure or FromStr failure).
MISSING_FIELD
A field required by the schema is absent from the tree.
UNKNOWN_CHILD
The tree references a child slot the schema does not declare.
UNKNOWN_FIELD
The tree carries a field the schema does not declare.
UNKNOWN_VARIANT
Tree’s variant did not match any VariantSchema in the NodeSchema.