pub struct Obstack { /* private fields */ }Implementations§
Source§impl Obstack
impl Obstack
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)
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 Obstack
impl Allocator for Obstack
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)
fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
unsafe fn grow( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
unsafe fn grow_zeroed( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
unsafe fn shrink( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>
fn by_ref(&self) -> &Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Obstack
impl RefUnwindSafe for Obstack
impl !Send for Obstack
impl !Sync for Obstack
impl Unpin for Obstack
impl UnwindSafe for Obstack
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