Struct bump_scope::BumpScopeGuard
source · pub struct BumpScopeGuard<'a, A, const MIN_ALIGN: usize = 1, const UP: bool = true>{ /* private fields */ }
Expand description
Returned from BumpScope::scope_guard
.
Implementations§
source§impl<'a, A, const MIN_ALIGN: usize, const UP: bool> BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize, const UP: bool> BumpScopeGuard<'a, A, MIN_ALIGN, UP>
sourcepub fn reset(&mut self)
pub fn reset(&mut self)
This will only keep around the newest chunk, which is also the biggest.
sourcepub fn stats(&self) -> Stats<'_, UP>
pub fn stats(&self) -> Stats<'_, UP>
Returns Stats
, which provides statistics about the memory usage of the bump allocator.
sourcepub fn guaranteed_allocated_stats(&self) -> GuaranteedAllocatedStats<'_, UP>
pub fn guaranteed_allocated_stats(&self) -> GuaranteedAllocatedStats<'_, UP>
Returns GuaranteedAllocatedStats
, which provides statistics about the memory usage of the bump allocator.
Trait Implementations§
source§impl<'a, A, const MIN_ALIGN: usize, const UP: bool> Debug for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize, const UP: bool> Debug for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
Auto Trait Implementations§
impl<'a, A, const MIN_ALIGN: usize, const UP: bool> Freeze for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize = 1, const UP: bool = true> !RefUnwindSafe for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize = 1, const UP: bool = true> !Send for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize = 1, const UP: bool = true> !Sync for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize, const UP: bool> Unpin for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
impl<'a, A, const MIN_ALIGN: usize = 1, const UP: bool = true> !UnwindSafe for BumpScopeGuard<'a, A, MIN_ALIGN, UP>
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