Skip to main content

Module types

Module types 

Source
Expand description

Type-system pieces of the IR.

Every named type lives in crate::Ir::types keyed by its sanitized NamedType::id. TypeRef is just that string. This makes recursion trivial across the WIT boundary (no recursive records) and keeps the structure flat.

Structs§

ArrayConstraints
ArrayType
Discriminator
EnumIntType
EnumIntValue
One value in an integer-typed enum. OAS / JSON Schema does not define per-value documentation; see EnumStringValue.
EnumStringType
EnumStringValue
One value in a string-typed enum. OAS / JSON Schema does not define per-value documentation, so this is a bare value. Per-value docs would have to come from a vendor extension and are out of scope.
NamedType
ObjectConstraints
ObjectType
PrimitiveConstraints
PrimitiveType
Property
UnionType
UnionVariant

Enums§

AdditionalProperties
IntKind
PrimitiveKind
JSON Schema’s type keyword values, minus the variants that have their own IR shapes (object / array / null). The format keyword and any width/semantic refinement (int32 / int64 / float / double / date / uuid / byte / decimal / etc.) land on PrimitiveConstraints::format_extension verbatim. Plugins decide whether to produce a richer target-language type based on the format string. This keeps the IR uniform and orthogonal — adding new formats never requires an IR/WIT/bindgen roundtrip.
TypeDef
UnionKind

Constants§

NULL_ID
Canonical pool id for the TypeDef::Null singleton. See issue #107.

Type Aliases§

TypeRef
String id into crate::Ir::types.