Skip to main content

Module types

Module types 

Source
Expand description

Intermediate representation types.

The IR sits between the raw XSD AST (crate::xsd::Schema) and the final emitted Rust token stream. It is closer to Rust than XSD: XML names have been mapped to Rust identifiers, cardinality has been resolved into Cardinality variants, and built-in XSD types have been mapped to RustType.

§Entry point

See TypeGraph for the top-level structure produced by crate::ir::lower::lower.

Structs§

AttrDef
A single XML attribute inside a ValueWithAttrDef.
CodeEnumDef
A string-code enum generated from xs:simpleType with xs:enumeration facets.
CodeValue
A single code value within a CodeEnumDef.
EnumDef
An enum generated from an xs:complexType with an xs:choice.
FieldDef
A single field inside a StructDef.
NewtypeDef
A newtype wrapping a primitive type with optional validation constraints.
OpaqueDef
An opaque wrapper generated from xs:complexType with xs:any.
RootElement
A top-level element declaration referencing a named type.
StructDef
A struct generated from an xs:complexType with an xs:sequence.
TypeGraph
The complete intermediate representation of a single XSD schema.
ValueWithAttrDef
A value type that also carries XML attributes.
VariantDef
A single variant inside an EnumDef.

Enums§

Cardinality
How many times a field may appear.
Constraint
A constraint derived from an XSD facet applied to a NewtypeDef.
RustType
Primitive Rust types that XSD built-in types map to.
TypeDef
A single type definition in the IR.
TypeRef
A reference to a type in the IR.