Skip to main content

Module emit_models

Module emit_models 

Source
Expand description

Sigil-stitch emit for IR schemas (Rust models).

Each supported IrSchemaKind maps to one models/<name>.rs file.

Coverage:

  • Object — struct with serde derives and #[serde(rename)] tags.
  • Enum — Rust enum with serde rename per variant.
  • Aliaspub type X = Y;
  • Union#[serde(untagged)] enum.
  • Intersection — struct with #[serde(flatten)] fields.
  • TaggedUnion — serde-tagged enum (internal/adjacent/external).

Functions§

generate_model_files
Generate every model file from the IR.
rust_type_str
rust_type_str_qualified
Map an IR type to a Rust type string, qualified for use from API modules. Named references to suppressed primitive aliases are resolved to the primitive type.