pub unsafe trait BaseAllocator: Clone {
// Required method
unsafe fn get_allocation_callbacks(&self) -> Option<AllocationCallbacks>;
}Expand description
See https://docs.vulkan.org/spec/latest/chapters/memory.html Cost-free allocator implementation for Vulkan Vulkan allows a custom memory allocator to be specified for host allocations with the vk::AllocationCallbacks object If possible, please look at and use Allocator instead for a nicer interface to implement
§Safety
Any implementation must return a vk::AllocationCallbacks object that follows the specification. See link above.
Required Methods§
Sourceunsafe fn get_allocation_callbacks(&self) -> Option<AllocationCallbacks>
unsafe fn get_allocation_callbacks(&self) -> Option<AllocationCallbacks>
SAFETY: If not None, the returned vk::AllocationCallbacks object must not outlive self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".