Skip to main content

ToSlot

Trait ToSlot 

Source
pub trait ToSlot {
    const NATIVE_KIND: NativeKind;

    // Required method
    fn to_slot(self) -> u64;
}
Expand description

Write a typed value into an 8-byte raw-bits slot.

Symmetric to FromSlot. Used by per-arity registration helpers when the body returns a primitive-typed value directly. Container TypedReturn variants (Ok/Err/Some/ObjectPairs/etc.) don’t impl ToSlot — they’re projected by the dispatcher’s TypedReturn → slot push step (Phase 2c per-module migrations).

Required Associated Constants§

Required Methods§

Source

fn to_slot(self) -> u64

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToSlot for bool

Source§

const NATIVE_KIND: NativeKind = NativeKind::Bool

Source§

fn to_slot(self) -> u64

Source§

impl ToSlot for f64

Source§

const NATIVE_KIND: NativeKind = NativeKind::Float64

Source§

fn to_slot(self) -> u64

Source§

impl ToSlot for i64

Source§

const NATIVE_KIND: NativeKind = NativeKind::Int64

Source§

fn to_slot(self) -> u64

Source§

impl ToSlot for Arc<String>

Source§

const NATIVE_KIND: NativeKind = NativeKind::String

Source§

fn to_slot(self) -> u64

Source§

impl ToSlot for Arc<Vec<f64>>

Project an Arc<Vec<f64>> into a NativeKind::Ptr(HeapKind::TypedArray) slot whose payload is *mut TypedArray<f64>. V3-S5 ckpt-5-prime²c Migration shape (a) — replaces the pre-migration ToSlot for Arc<AlignedTypedBuffer> entry.

Source§

impl ToSlot for Arc<Vec<i64>>

Project an Arc<Vec<i64>> into a NativeKind::Ptr(HeapKind::TypedArray) slot whose payload is *mut TypedArray<i64>. V3-S5 ckpt-5-prime²c Migration shape (a).

Source§

impl ToSlot for Arc<Vec<u8>>

Project an Arc<Vec<u8>> into a NativeKind::Ptr(HeapKind::TypedArray) slot whose payload is *mut TypedArray<u8>. V3-S5 ckpt-5-prime²c Migration shape (a).

Source§

impl ToSlot for Arc<DataTable>

Write an Arc<DataTable> into a heap slot by wrapping in HeapValue::DataTable and producing the raw Arc<HeapValue> pointer.

Source§

impl ToSlot for Arc<IoHandleData>

Write an Arc<IoHandleData> into a heap slot by wrapping in HeapValue::IoHandle and producing the raw Arc<HeapValue> pointer.

Source§

impl ToSlot for Vec<Arc<HeapValue>>

Project a Vec<Arc<HeapValue>> into a NativeKind::Ptr(HeapKind::TypedArray) slot.

V3-S5 ckpt-5-prime²c (2026-05-15) SURFACE-AND-STOP: same per-element-T dispatcher gap as the FromSlot<Vec<Arc<HeapValue>>> reader above. The pre-deletion build_specialized_from_heap_arcs helper dispatched each HeapValue arm into the matching TypedArrayData::* variant; the new flat-struct carrier needs to pick the matching TypedArray<T>::from_slice instantiation per element kind and stamp the element discriminator before push. Pairs with the Round 2 follow-up cited in the FromSlot impl.

Source§

impl ToSlot for Vec<Arc<String>>

Project a Vec<Arc<String>> into a NativeKind::Ptr(HeapKind::TypedArray) slot whose payload is *mut TypedArray<*const StringObj>. V3-S5 ckpt-5-prime²c (2026-05-15): rewritten for the v2-raw flat-struct carrier — each input Arc<String> is allocated as a fresh StringObj with refcount=1, and the per-element pointers are packed into a new TypedArray<*const StringObj>. The slot takes ownership of the resulting raw pointer (refcount discipline goes through v2_retain / v2_release per HeapHeader).

Implementors§