#[repr(C)]
pub struct RustAllocatorVtable<T> { pub allocate: unsafe extern "C" fn(handle: &T, len: usize) -> *mut c_void, pub allocate_uninitialized: unsafe extern "C" fn(handle: &T, len: usize) -> *mut c_void, pub free: unsafe extern "C" fn(handle: &T, data: *mut c_void, len: usize), pub reallocate: unsafe extern "C" fn(handle: &T, data: *mut c_void, old_length: usize, new_length: usize) -> *mut c_void, pub drop: unsafe extern "C" fn(handle: *const T), }
Expand description

A wrapper around the V8 Allocator class.

Fields

allocate: unsafe extern "C" fn(handle: &T, len: usize) -> *mut c_voidallocate_uninitialized: unsafe extern "C" fn(handle: &T, len: usize) -> *mut c_voidfree: unsafe extern "C" fn(handle: &T, data: *mut c_void, len: usize)reallocate: unsafe extern "C" fn(handle: &T, data: *mut c_void, old_length: usize, new_length: usize) -> *mut c_voiddrop: unsafe extern "C" fn(handle: *const T)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.