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
EnumBoolType
EnumBoolValue
One value in a boolean-typed enum. OAS / JSON Schema does not define per-value documentation; see EnumStringValue.
EnumIntType
EnumIntValue
One value in an integer-typed enum. OAS / JSON Schema does not define per-value documentation; see EnumStringValue.
EnumNumberType
EnumNumberValue
One value in a number-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
PatternProperty
One entry of JSON Schema patternProperties: a property-name regex paired with the schema that matching property values must satisfy.
PrimitiveConstraints
PrimitiveType
Property
UnionType
UnionVariant

Enums§

AdditionalProperties
IntKind
NumberKind
Width refinement for a number-typed literal, mirroring IntKind. format: float selects NumberKind::Float; everything else (including format: double and an absent format) is NumberKind::Double.
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.