pub struct BufferMemoryAllocator<'a>(/* private fields */);Expand description
A class that does simple allocation based on a size and returns the pointer to the memory address. It bookmarks a buffer with certain size. The allocation is simply checking space and growing the cur_ pointer with each allocation request.
Implementations§
Trait Implementations§
Source§impl<'a> MemoryAllocator<'a> for BufferMemoryAllocator<'a>
impl<'a> MemoryAllocator<'a> for BufferMemoryAllocator<'a>
Auto Trait Implementations§
impl<'a> !Freeze for BufferMemoryAllocator<'a>
impl<'a> !RefUnwindSafe for BufferMemoryAllocator<'a>
impl<'a> Send for BufferMemoryAllocator<'a>
impl<'a> !Sync for BufferMemoryAllocator<'a>
impl<'a> Unpin for BufferMemoryAllocator<'a>
impl<'a> UnwindSafe for BufferMemoryAllocator<'a>
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
Source§impl<'a, T> MemoryAllocatorExt<'a> for Twhere
T: MemoryAllocator<'a> + ?Sized,
impl<'a, T> MemoryAllocatorExt<'a> for Twhere
T: MemoryAllocator<'a> + ?Sized,
Source§fn allocate_uninit<T>(&self) -> Option<&mut MaybeUninit<T>>
fn allocate_uninit<T>(&self) -> Option<&mut MaybeUninit<T>>
Allocates memory for a type
T with uninitialized memory. Read more