Expand description
Typed Result representations for v2 runtime.
Result<T, E> is a tagged union: tag (0=Ok, 1=Err) + payload. Size = 8 + max(sizeof(T), sizeof(E)). Monomorphized per instantiation.
Since Rust #[repr(C)] unions with generics are awkward, we provide
concrete instantiations for common Shape result types.
Structs§
- Result
F64Str - Result<f64, *const StringObj> — Ok is f64, Err is string pointer.
- Result
I64Str - Result<i64, *const StringObj> — Ok is i64, Err is string pointer.
- Result
PtrStr - Result<*const T, *const StringObj> — Ok is a heap pointer, Err is string pointer.
Constants§
- RESULT_
OFFSET_ PAYLOAD - RESULT_
OFFSET_ TAG - Byte offset constants for JIT codegen.
- RESULT_
TAG_ ERR - Tag value for Err variant.
- RESULT_
TAG_ OK - Tag value for Ok variant.