pub struct SimpleObstack { /* private fields */ }Implementations§
Source§impl SimpleObstack
impl SimpleObstack
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn push<P: AsRef<[u8]>>(&mut self, s: P)
pub fn pop(&mut self) -> Option<Box<[u8]>>
pub fn extend<P: AsRef<[u8]>>(&mut self, s: P)
pub fn finish(&mut self) -> NonNull<[u8]>
pub fn free(&mut self, s: &[u8])
Trait Implementations§
Source§impl Allocator for SimpleObstack
impl Allocator for SimpleObstack
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 SimpleObstack
impl Debug for SimpleObstack
Auto Trait Implementations§
impl Freeze for SimpleObstack
impl RefUnwindSafe for SimpleObstack
impl Send for SimpleObstack
impl Sync for SimpleObstack
impl Unpin for SimpleObstack
impl UnwindSafe for SimpleObstack
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