Skip to main content

wire_to_slot

Function wire_to_slot 

Source
pub fn wire_to_slot(
    wire: &WireValue,
    expected_kind: NativeKind,
) -> Result<u64, MarshalError>
Expand description

Project a WireValue to typed slot bits, given the kind the caller wants. Returns [MarshalError::KindMismatch] when wire shape doesn’t match the expected kind.

For heap kinds, this allocates a new Arc<HeapValue> and returns the raw pointer as bits — caller takes ownership of the heap reference (one strong count).