#[repr(C)]pub struct AllocationCallbacks {
pub p_user_data: *mut c_void,
pub pfn_allocation: PFN_vkAllocationFunction,
pub pfn_reallocation: PFN_vkReallocationFunction,
pub pfn_free: PFN_vkFreeFunction,
pub pfn_internal_allocation: PFN_vkInternalAllocationNotification,
pub pfn_internal_free: PFN_vkInternalFreeNotification,
}Expand description
Native structure VkAllocationCallbacks.
Fields§
§p_user_data: *mut c_voidNative field pUserData.
pfn_allocation: PFN_vkAllocationFunctionNative field pfnAllocation.
pfn_reallocation: PFN_vkReallocationFunctionNative field pfnReallocation.
pfn_free: PFN_vkFreeFunctionNative field pfnFree.
pfn_internal_allocation: PFN_vkInternalAllocationNotificationNative field pfnInternalAllocation.
pfn_internal_free: PFN_vkInternalFreeNotificationNative field pfnInternalFree.
Implementations§
Source§impl AllocationCallbacks
impl AllocationCallbacks
Sourcepub unsafe fn set_user_data(self, value: *mut c_void) -> Self
pub unsafe fn set_user_data(self, value: *mut c_void) -> Self
Set native pointer pUserData explicitly. No borrow or extent is inferred.
§Safety
The caller must establish pointee validity, extent, alignment, aliasing and the full native retention lifetime before using this record in a native call. Callback, external-object and nested-pointer contracts remain caller obligations.
Sourcepub fn set_pfn_allocation(self, value: PFN_vkAllocationFunction) -> Self
pub fn set_pfn_allocation(self, value: PFN_vkAllocationFunction) -> Self
Set native field pfnAllocation without native effects.
Sourcepub fn set_pfn_reallocation(self, value: PFN_vkReallocationFunction) -> Self
pub fn set_pfn_reallocation(self, value: PFN_vkReallocationFunction) -> Self
Set native field pfnReallocation without native effects.
Sourcepub fn set_pfn_free(self, value: PFN_vkFreeFunction) -> Self
pub fn set_pfn_free(self, value: PFN_vkFreeFunction) -> Self
Set native field pfnFree without native effects.
Sourcepub fn set_pfn_internal_allocation(
self,
value: PFN_vkInternalAllocationNotification,
) -> Self
pub fn set_pfn_internal_allocation( self, value: PFN_vkInternalAllocationNotification, ) -> Self
Set native field pfnInternalAllocation without native effects.
Sourcepub fn set_pfn_internal_free(
self,
value: PFN_vkInternalFreeNotification,
) -> Self
pub fn set_pfn_internal_free( self, value: PFN_vkInternalFreeNotification, ) -> Self
Set native field pfnInternalFree without native effects.