pub struct ScopedArenaExt { /* private fields */ }Expand description
A scoped arena that tracks a watermark for bulk deallocation.
Implementations§
Source§impl ScopedArenaExt
impl ScopedArenaExt
Sourcepub fn push_scope(&mut self)
pub fn push_scope(&mut self)
Pushes a scope: records the current allocation watermark.
Sourcepub fn pop_scope(&mut self)
pub fn pop_scope(&mut self)
Pops a scope: resets allocation to the saved watermark. Panics if no scope is active.
Sourcepub fn scope_depth(&self) -> usize
pub fn scope_depth(&self) -> usize
Returns the current depth of nested scopes.
Auto Trait Implementations§
impl Freeze for ScopedArenaExt
impl RefUnwindSafe for ScopedArenaExt
impl Send for ScopedArenaExt
impl Sync for ScopedArenaExt
impl Unpin for ScopedArenaExt
impl UnsafeUnpin for ScopedArenaExt
impl UnwindSafe for ScopedArenaExt
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