Skip to main content

init_erased_sidecars

Function init_erased_sidecars 

Source
pub(crate) unsafe fn init_erased_sidecars<T: TypedExternal>(
    value: &T,
    owner: SEXP,
)
Expand description

Initializes the slots of a trait-ABI owner using the ordinary sidecar layout and visitation hook. The Rust allocation remains erased storage; it must never be wrapped as ExternalPtr<T> (which expects Any storage).

§Safety

On R’s main thread inside an R unwind boundary. owner must be the caller-rooted external pointer owning value, with its finalizer already registered.