pub struct DeviceMemoryCallbacks {
pub allocated: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>,
pub freed: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>,
pub p_user_data: *mut c_void,
}Expand description
Informative notifications for actual native memory allocation/free effects. Callbacks do not allocate Rust metadata and do not own the native memory.
Fields§
§allocated: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>§freed: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>§p_user_data: *mut c_voidImplementations§
Source§impl DeviceMemoryCallbacks
impl DeviceMemoryCallbacks
Sourcepub fn set_allocated(
self,
value: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>,
) -> Self
pub fn set_allocated( self, value: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>, ) -> Self
Set allocated and return the updated record.
Sourcepub fn set_freed(
self,
value: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>,
) -> Self
pub fn set_freed( self, value: Option<unsafe extern "system" fn(DeviceHandle, DeviceMemory, u64, u32, *mut c_void)>, ) -> Self
Set freed and return the updated record.
Sourcepub fn set_p_user_data(self, value: *mut c_void) -> Self
pub fn set_p_user_data(self, value: *mut c_void) -> Self
Set p_user_data and return the updated record.
Trait Implementations§
Source§impl Clone for DeviceMemoryCallbacks
impl Clone for DeviceMemoryCallbacks
impl Copy for DeviceMemoryCallbacks
Auto Trait Implementations§
impl !Send for DeviceMemoryCallbacks
impl !Sync for DeviceMemoryCallbacks
impl Forget for DeviceMemoryCallbacks
impl Freeze for DeviceMemoryCallbacks
impl Move for DeviceMemoryCallbacks
impl RefUnwindSafe for DeviceMemoryCallbacks
impl Unpin for DeviceMemoryCallbacks
impl UnsafeUnpin for DeviceMemoryCallbacks
impl UnwindSafe for DeviceMemoryCallbacks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more