pub struct BumpLocal { /* private fields */ }Expand description
Per-thread wrapper around a bumpalo::Bump allocator.
Implementations§
Source§impl BumpLocal
impl BumpLocal
Sourcepub fn as_inner(&self) -> &Bump
pub fn as_inner(&self) -> &Bump
Returns a reference to the underlying bumpalo::Bump allocator.
The returned reference provides access to all bumpalo::Bump allocation methods.
Sourcepub fn reset(&self)
pub fn reset(&self)
Resets the allocator, deallocating all previously allocated memory.
§Note
- This does not run any
Dropimplementations. - Like
bumpalo::Bump::reset(), callers must ensure no references to allocated memory are used after calling this method.
Auto Trait Implementations§
impl !Freeze for BumpLocal
impl !RefUnwindSafe for BumpLocal
impl Send for BumpLocal
impl !Sync for BumpLocal
impl Unpin for BumpLocal
impl !UnwindSafe for BumpLocal
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