Skip to main content

Module heap_value

Module heap_value 

Source
Expand description

Compact heap-allocated value types for ValueWord TAG_HEAP.

HeapValue is the heap backing store for ValueWord. Every type that cannot be stored inline in the ValueWord 8-byte encoding gets a dedicated HeapValue variant.

The enum definition, HeapKind discriminant, kind(), is_truthy(), and type_name() are all generated from the single source of truth in define_heap_types! (see heap_variants.rs).

equals() and structural_eq() remain hand-written because they have complex per-variant logic (e.g. cross-type numeric comparison).

Structs§

AtomicData
Atomic integer for lock-free concurrent access. Only supports integer values (load/store/compare_exchange).
DataReferenceData
Data for DataReference variant (boxed to keep HeapValue small).
DequeData
Data for Deque variant — double-ended queue backed by VecDeque.
GeneratorState
Generator function state machine.
HashMapData
Data for HashMap variant (boxed to keep HeapValue small).
IoHandleData
Data for IoHandle variant (boxed to keep HeapValue small).
IteratorState
Lazy iterator state — supports chained transforms without materializing intermediates.
LazyData
Lazy-initialized value — compute once, cache forever. The initializer closure runs at most once; subsequent accesses return the cached result.
MatrixData
Flat, SIMD-aligned matrix storage (row-major order).
MutexData
Interior-mutable concurrent wrapper. Only type (besides Atomic/Lazy) with interior mutability — &Mutex<T> can mutate the inner value via lock().
NativeLayoutField
Field layout metadata for type C structs.
NativeTypeLayout
Runtime layout descriptor for one native type.
NativeViewData
Pointer-backed zero-copy view into native memory.
PriorityQueueData
Data for PriorityQueue variant — binary min-heap.
SetData
Data for Set variant (boxed to keep HeapValue small).
SimulationCallData
Data for SimulationCall variant (boxed to keep HeapValue small).

Enums§

ChannelData
MPSC channel endpoint (sender or receiver).
HeapKind
Discriminator for HeapValue variants, usable without full pattern match.
HeapValue
Compact heap-allocated value for ValueWord TAG_HEAP.
IoHandleKind
I/O handle kind discriminant.
IoResource
The underlying OS resource wrapped by an IoHandle.
IteratorTransform
A lazy transform in an iterator chain.
NativeScalar
Width-aware native scalar for C interop.