Skip to main content

Module typed_option

Module typed_option 

Source
Expand description

Typed Option representations for v2 runtime.

For heap types: Option<*const T> = nullable pointer. None = null (0x0), Some(v) = non-null pointer. Zero overhead.

For primitive types: tagged struct with has_value discriminant.

Structs§

PrimitiveOption
Option for primitive (non-pointer) types.

Constants§

PRIMITIVE_OPTION_OFFSET_HAS_VALUE
Byte offset constants for JIT codegen.
PRIMITIVE_OPTION_OFFSET_VALUE

Functions§

heap_option_is_none
Check if a heap option is None (null pointer).
heap_option_is_some
Check if a heap option is Some (non-null pointer).

Type Aliases§

HeapOption
Option for heap pointer types — just a nullable pointer. None = null (0x0), Some = non-null pointer. Zero overhead.