pub trait MutBumpAllocatorScope<'a>: MutBumpAllocator + BumpAllocatorScope<'a> { }Expand description
A shorthand for MutBumpAllocator + BumpAllocatorScope<’a>
Trait Implementations§
Source§impl BumpAllocatorExt for dyn MutBumpAllocatorScope<'_> + '_
impl BumpAllocatorExt for dyn MutBumpAllocatorScope<'_> + '_
Source§fn stats(&self) -> AnyStats<'_>
fn stats(&self) -> AnyStats<'_>
Returns a type which provides statistics about the memory usage of the bump allocator.
Source§fn try_allocate_layout(&self, layout: Layout) -> Result<NonNull<u8>, AllocError>
fn try_allocate_layout(&self, layout: Layout) -> Result<NonNull<u8>, AllocError>
Source§fn try_allocate_sized<T>(&self) -> Result<NonNull<T>, AllocError>
fn try_allocate_sized<T>(&self) -> Result<NonNull<T>, AllocError>
Source§fn allocate_slice<T>(&self, len: usize) -> NonNull<T>
fn allocate_slice<T>(&self, len: usize) -> NonNull<T>
Source§fn try_allocate_slice<T>(&self, len: usize) -> Result<NonNull<T>, AllocError>
fn try_allocate_slice<T>(&self, len: usize) -> Result<NonNull<T>, AllocError>
Source§unsafe fn shrink_slice<T>(
&self,
ptr: NonNull<T>,
old_len: usize,
new_len: usize,
) -> Option<NonNull<T>>
unsafe fn shrink_slice<T>( &self, ptr: NonNull<T>, old_len: usize, new_len: usize, ) -> Option<NonNull<T>>
Source§fn prepare_slice_allocation<T>(&self, len: usize) -> NonNull<[T]>
fn prepare_slice_allocation<T>(&self, len: usize) -> NonNull<[T]>
A specialized version of
prepare_allocation. Read moreSource§fn try_prepare_slice_allocation<T>(
&self,
len: usize,
) -> Result<NonNull<[T]>, AllocError>
fn try_prepare_slice_allocation<T>( &self, len: usize, ) -> Result<NonNull<[T]>, AllocError>
A specialized version of
prepare_allocation. Read moreSource§unsafe fn allocate_prepared_slice<T>(
&self,
ptr: NonNull<T>,
len: usize,
cap: usize,
) -> NonNull<[T]>
unsafe fn allocate_prepared_slice<T>( &self, ptr: NonNull<T>, len: usize, cap: usize, ) -> NonNull<[T]>
A specialized version of
allocate_prepared. Read moreSource§unsafe fn allocate_prepared_slice_rev<T>(
&self,
ptr: NonNull<T>,
len: usize,
cap: usize,
) -> NonNull<[T]>
unsafe fn allocate_prepared_slice_rev<T>( &self, ptr: NonNull<T>, len: usize, cap: usize, ) -> NonNull<[T]>
A specialized version of
allocate_prepared_rev. Read more