Module generator

Module generator 

Source
Expand description

Code generation pipeline for transforming resolved schema models into Rust data structures.

This module defines the Generator and GeneratorFixed types, along with supporting logic and configuration mechanisms for converting fully interpreted MetaTypes into concrete Rust representations DataTypes.

The Generator allows fine-grained configuration such as boxing strategy, type naming, serde support, and handling of xs:any/xs:anyAttribute. Once configured, the generator can be “fixed” into a GeneratorFixed state to emit type definitions in a controlled, deterministic fashion.

Code generation is performed by walking the dependency graph of types, resolving references, and emitting type-safe Rust structures including enums, structs, and aliases.

§Example

let data_types = Generator::new(meta_types)
    .with_flags(GeneratorFlags::USE_MODULES)
    .generate_named_types()?
    .finish();

Structs§

Context
Helper type that is used to request the code generation for a specific type.
Generator
Configurable Rust code generator for schema-derived type information.
GeneratorFixed
Finalized code generator that emits Rust types from resolved schema definitions.
MetaData
Meta data of the generator process.

Enums§

Error
Error that might be raised by the Generator.