pub enum ConcreteType {
Show 34 variants
F64,
F32,
Char,
I64,
I32,
I16,
I8,
U64,
U32,
U16,
U8,
Bool,
String,
Struct(NamedTypeId<StructLayoutId>),
Array(Box<ConcreteType>),
HashMap(Box<ConcreteType>, Box<ConcreteType>),
Option(Box<ConcreteType>),
Result(Box<ConcreteType>, Box<ConcreteType>),
Enum(NamedTypeId<EnumLayoutId>),
Closure(ClosureTypeId),
Function(FunctionTypeId),
Pointer(Box<ConcreteType>),
Tuple(Vec<ConcreteType>),
Void,
Decimal,
BigInt,
DateTime,
HashSet(Box<ConcreteType>),
Deque(Box<ConcreteType>),
PriorityQueue,
Channel(Box<ConcreteType>),
Mutex(Box<ConcreteType>),
Atomic,
Lazy(Box<ConcreteType>),
}Expand description
Fully resolved, monomorphized type. No type variables, no generics.
Every expression and local slot in compiled bytecode has exactly one
ConcreteType. The compiler resolves all Type::Variable and
Type::Generic to ConcreteType after type inference.
The discriminant is stored as u8 for compact bytecode encoding.
Variants§
F64
f64 — the default number type.
F32
f32 — 4-byte single-precision float. ADR-006 §2.7.5 amendment
(Round 19 S1.5, 2026-05-14): scalar concrete type introduced
alongside NativeKind::Float32 for Array<f32> v2-raw
producer paths.
Char
char — 4-byte Unicode scalar (UTF-32 subset of u32). ADR-006
§2.7.5 amendment (Round 19 S1.5, 2026-05-14): scalar concrete
type introduced alongside NativeKind::Char for Array<char>
v2-raw producer paths.
I64
i64 — the default int type (i48 in NaN-boxed representation).
I32
i32
I16
i16
I8
i8
U64
u64
U32
u32
U16
u16
U8
u8
Bool
bool
String
Interned string (*const StringObj).
Struct(NamedTypeId<StructLayoutId>)
Typed struct with compile-time field layout. Carries the source-level
type name (v0.3 WS-6) — see NamedTypeId.
Array(Box<ConcreteType>)
Homogeneous typed array with known element type.
Array<number> → Array(Box::new(ConcreteType::F64)).
HashMap(Box<ConcreteType>, Box<ConcreteType>)
Typed hash map with known key and value types.
Option(Box<ConcreteType>)
Nullable type — T? / Option<T>.
Result(Box<ConcreteType>, Box<ConcreteType>)
Result type — Result<T, E>.
Enum(NamedTypeId<EnumLayoutId>)
Typed enum with compile-time variant layouts. Carries the source-level
type name (v0.3 WS-6) — see NamedTypeId.
Closure(ClosureTypeId)
Closure with typed capture slots.
Function(FunctionTypeId)
Function pointer with known signature.
Pointer(Box<ConcreteType>)
Raw typed pointer (for FFI / extern C).
Tuple(Vec<ConcreteType>)
Tuple with known element types.
Void
Void (unit) — no value.
Decimal
Decimal (rust_decimal::Decimal).
BigInt
BigInt (arbitrary precision integer).
DateTime
DateTime.
HashSet(Box<ConcreteType>)
HashSet with known element type. String-only at landing per
ADR-006 §2.7.15 (HeapKind::HashSet); the inner ConcreteType
is String at construction sites today, and the parametric arm
shape preserves room for the future typed-payload extension.
Deque(Box<ConcreteType>)
Heterogeneous-element double-ended queue. Storage at the
Arc<DequeData> tier is VecDeque<Arc<HeapValue>> (§2.7.17
Q19 deferral); the ConcreteType inner element kind is the
per-element kind the producing-site classification stamps when
the bytecode compiler can prove it (e.g. Deque<int> literal
construction), else ConcreteType::Void placeholder.
PriorityQueue
i64-priority min-heap. i64-only at landing per ADR-006 §2.7.18
(HeapKind::PriorityQueue); no element-kind variance. Typed-
payload PriorityQueue is the Phase-2c amendment (§2.7.18
“Out-of-scope”) tracked separately.
Channel(Box<ConcreteType>)
MPSC-style channel with typed payload kind. Storage at the
Arc<ChannelData> tier holds KindedSlot elements (§2.7.20);
the ConcreteType inner kind is the element kind for Channel<T>
landings. ConcreteType::Void placeholder when the producing
site can’t prove the element kind.
Mutex(Box<ConcreteType>)
Mutex<T> concurrency primitive — single typed payload protected
by Mutex<MutexInner> per ADR-006 §2.7.25. Inner ConcreteType
is the wrapped value’s kind (Mutex(int) → Mutex(I64)); the
payload is mutable at runtime and the parametric arm captures the
declared inner kind for the m.get() → T parametric-return
classifier at the §2.7.5 conduit.
Atomic
Atomic<i64> concurrency primitive — wraps
std::sync::atomic::AtomicI64 per ADR-006 §2.7.25. i64-only at
landing per the “typed-payload deferral” precedent
(W15-priority-queue i64-only, W13-hashset string-only); typed-
payload Atomic<T> is the Phase-2c amendment tracked separately.
Lazy(Box<ConcreteType>)
Lazy<T> initialize-once carrier — wraps an initializer closure
- cached value slot per ADR-006 §2.7.25. Inner
ConcreteTypeis the cached value’s kind (the closure’s return type), enabling thel.get() → Tparametric-return classifier at the §2.7.5 conduit.
Implementations§
Source§impl ConcreteType
impl ConcreteType
Sourcepub fn named_struct(name: impl Into<Arc<str>>, layout: StructLayoutId) -> Self
pub fn named_struct(name: impl Into<Arc<str>>, layout: StructLayoutId) -> Self
v0.3 WS-6 — a named struct ConcreteType. The name is the
load-bearing type identity (cache key + substituted annotation); the
layout id is a placeholder until the schema-aware layout registry
lands.
Sourcepub fn named_enum(name: impl Into<Arc<str>>, layout: EnumLayoutId) -> Self
pub fn named_enum(name: impl Into<Arc<str>>, layout: EnumLayoutId) -> Self
v0.3 WS-6 — a named enum ConcreteType. See Self::named_struct.
Sourcepub fn placeholder_struct(layout: StructLayoutId) -> Self
pub fn placeholder_struct(layout: StructLayoutId) -> Self
A struct ConcreteType with no threaded name (legacy/placeholder
producers — see NamedTypeId).
Sourcepub fn placeholder_enum(layout: EnumLayoutId) -> Self
pub fn placeholder_enum(layout: EnumLayoutId) -> Self
An enum ConcreteType with no threaded name (legacy/placeholder
producers — see NamedTypeId).
Sourcepub fn stack_size(&self) -> usize
pub fn stack_size(&self) -> usize
Size in bytes for stack storage (all values stored as 8-byte slots).
Sourcepub fn field_size(&self) -> usize
pub fn field_size(&self) -> usize
Size in bytes when stored in a struct field (not on stack).
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Whether this type is a numeric type (integer or float).
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Whether this type is an integer type.
Sourcepub fn to_field_kind(&self) -> FieldKind
pub fn to_field_kind(&self) -> FieldKind
Convert to the corresponding FieldKind for struct layout computation.
Trait Implementations§
Source§impl Clone for ConcreteType
impl Clone for ConcreteType
Source§fn clone(&self) -> ConcreteType
fn clone(&self) -> ConcreteType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConcreteType
impl Debug for ConcreteType
Source§impl<'de> Deserialize<'de> for ConcreteType
impl<'de> Deserialize<'de> for ConcreteType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ConcreteType
impl Display for ConcreteType
Source§impl From<FieldKind> for ConcreteType
Convert from FieldKind (struct layout) to ConcreteType.
impl From<FieldKind> for ConcreteType
Convert from FieldKind (struct layout) to ConcreteType.
Source§impl Hash for ConcreteType
impl Hash for ConcreteType
Source§impl PartialEq for ConcreteType
impl PartialEq for ConcreteType
Source§fn eq(&self, other: &ConcreteType) -> bool
fn eq(&self, other: &ConcreteType) -> bool
self and other values to be equal, and is used by ==.