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. - Code
Enum Def - A string-code enum generated from
xs:simpleTypewithxs:enumerationfacets. - Code
Value - A single code value within a
CodeEnumDef. - EnumDef
- An enum generated from an
xs:complexTypewith anxs:choice. - Field
Def - A single field inside a
StructDef. - Newtype
Def - A newtype wrapping a primitive type with optional validation constraints.
- Opaque
Def - An opaque wrapper generated from
xs:complexTypewithxs:any. - Root
Element - A top-level element declaration referencing a named type.
- Struct
Def - A struct generated from an
xs:complexTypewith anxs:sequence. - Type
Graph - The complete intermediate representation of a single XSD schema.
- Value
With Attr Def - A value type that also carries XML attributes.
- Variant
Def - 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. - Rust
Type - 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.