pub trait BufferAllocator<const ALIGNMENT: usize>: Allocator {
// Provided method
unsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>) { ... }
}Expand description
A trait for types that can allocate aligned buffers.
Provided Methods§
Sourceunsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>)
unsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>)
Deallocates the buffer.
§Safety
ptrmust denote a block of memory currently allocated via this allocator, andlayoutmust fit that block of memory.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".