typst_utils::fat

Function from_raw_parts

source
pub unsafe fn from_raw_parts<T: ?Sized>(
    data: *const (),
    vtable: *const (),
) -> *const T
Expand description

Create a fat pointer from a data address and a vtable address.

ยงSafety

Must only be called when T is a dyn Trait. The data address must point to a value whose type implements the trait of T and the vtable must have been extracted with vtable.