Skip to main content

ConcreteType

Enum ConcreteType 

Source
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 ConcreteType is the cached value’s kind (the closure’s return type), enabling the l.get() → T parametric-return classifier at the §2.7.5 conduit.

Implementations§

Source§

impl ConcreteType

Source

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.

Source

pub fn named_enum(name: impl Into<Arc<str>>, layout: EnumLayoutId) -> Self

v0.3 WS-6 — a named enum ConcreteType. See Self::named_struct.

Source

pub fn placeholder_struct(layout: StructLayoutId) -> Self

A struct ConcreteType with no threaded name (legacy/placeholder producers — see NamedTypeId).

Source

pub fn placeholder_enum(layout: EnumLayoutId) -> Self

An enum ConcreteType with no threaded name (legacy/placeholder producers — see NamedTypeId).

Source

pub fn stack_size(&self) -> usize

Size in bytes for stack storage (all values stored as 8-byte slots).

Source

pub fn alignment(&self) -> usize

Natural alignment for this type when stored in a struct.

Source

pub fn field_size(&self) -> usize

Size in bytes when stored in a struct field (not on stack).

Source

pub fn is_numeric(&self) -> bool

Whether this type is a numeric type (integer or float).

Source

pub fn is_integer(&self) -> bool

Whether this type is an integer type.

Source

pub fn is_heap(&self) -> bool

Whether this type is a heap-allocated reference type.

Source

pub fn is_scalar(&self) -> bool

Whether this is a primitive scalar that fits in a register.

Source

pub fn to_field_kind(&self) -> FieldKind

Convert to the corresponding FieldKind for struct layout computation.

Source

pub fn mono_key(&self) -> String

Generate a monomorphization key string for specialization caching. e.g., "f64", "array_i64", "hashmap_string_f64"

Source

pub fn type_tag(&self) -> u8

Compact type tag for bytecode encoding (single byte).

Trait Implementations§

Source§

impl Clone for ConcreteType

Source§

fn clone(&self) -> ConcreteType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConcreteType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ConcreteType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ConcreteType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<FieldKind> for ConcreteType

Convert from FieldKind (struct layout) to ConcreteType.

Source§

fn from(fk: FieldKind) -> Self

Converts to this type from the input type.
Source§

impl Hash for ConcreteType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ConcreteType

Source§

fn eq(&self, other: &ConcreteType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ConcreteType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ConcreteType

Source§

impl StructuralPartialEq for ConcreteType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,