rusty_v8

Function new_rust_allocator

Source
pub unsafe fn new_rust_allocator<T: Sized + Send + Sync + 'static>(
    handle: *const T,
    vtable: &'static RustAllocatorVtable<T>,
) -> UniqueRef<Allocator>
Expand description

Creates an allocator managed by Rust code.

Marked unsafe because the caller must ensure that handle is valid and matches what vtable expects.