pub unsafe trait AllocatorCallback: Sized {
// Required methods
unsafe extern "C" fn allocate(
size: u64,
name: *const c_void,
file: *const c_void,
line: u32,
user_data: *const c_void,
) -> *mut c_void;
unsafe extern "C" fn deallocate(
ptr: *const c_void,
user_data: *const c_void,
);
// Provided method
unsafe fn into_px(self) -> *mut PxAllocatorCallback { ... }
}Expand description
A trait for creating allocator callbacks for PhysX.
Reporting the name, file and line is not enabled by default.
Use Foundation::set_report_allocation_names to toggle this on or off.
Required Methods§
Provided Methods§
Sourceunsafe fn into_px(self) -> *mut PxAllocatorCallback
unsafe fn into_px(self) -> *mut PxAllocatorCallback
§Safety
Do not override this method.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.