pub struct StackArena { /* private fields */ }Implementations§
Source§impl StackArena
impl StackArena
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn push<P: AsRef<[u8]>>(&mut self, data: P) -> NonNull<[u8]>
pub fn pop(&mut self)
pub fn extend<P: AsRef<[u8]>>(&mut self, data: P)
pub fn finish(&mut self) -> NonNull<[u8]>
pub fn free(&mut self, data: &[u8])
Trait Implementations§
Source§impl Allocator for StackArena
impl Allocator for StackArena
unsafe fn allocate( &mut self, layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
unsafe fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout)
unsafe fn grow( &mut self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
unsafe fn shrink( &mut self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
unsafe fn allocate_zeroed( &mut self, layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
unsafe fn grow_zeroed( &mut self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
fn by_ref(&self) -> &Selfwhere
Self: Sized,
Source§impl Debug for StackArena
impl Debug for StackArena
Auto Trait Implementations§
impl Freeze for StackArena
impl RefUnwindSafe for StackArena
impl !Send for StackArena
impl !Sync for StackArena
impl Unpin for StackArena
impl UnwindSafe for StackArena
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