Skip to main content

Module ir

Module ir 

Source
Expand description

Re-export core types for advanced usage. Internal Representation (IR) for typewriter.

The IR is the language-agnostic bridge between Rust’s AST and each language emitter. Every emitter only needs to know about these types — it never touches syn or Rust AST directly.

Structs§

EnumDef
A complete enum definition in the IR.
FieldDef
A single field inside a struct.
StructDef
A complete struct definition in the IR.
VariantDef
A single enum variant.

Enums§

EnumRepr
How the enum is represented in JSON (mirrors serde’s options).
Language
The target languages that typewriter can generate code for.
PrimitiveType
Rust primitive types that map to language-specific equivalents.
TypeDef
Top-level item — either a struct or an enum.
TypeKind
Every Rust type is mapped to one of these variants.
VariantKind
The kind of data an enum variant carries.