Struct bump_scope::Stats
source · #[repr(transparent)]pub struct Stats<'a, const UP: bool> {
pub current: Chunk<'a, UP>,
}
Expand description
Provides statistics about the memory usage of the bump allocator.
This is returned from the stats
method of Bump
, BumpScope
, BumpScopeGuard
, BumpVec
, …
Fields§
§current: Chunk<'a, UP>
This is the chunk we are currently allocating on.
Implementations§
source§impl<'a, const UP: bool> Stats<'a, UP>
impl<'a, const UP: bool> Stats<'a, UP>
sourcepub fn allocated(self) -> usize
pub fn allocated(self) -> usize
Returns the amount of allocated bytes. This includes padding and wasted space due to reallocations.
sourcepub fn small_to_big(self) -> ChunkNextIter<'a, UP> ⓘ
pub fn small_to_big(self) -> ChunkNextIter<'a, UP> ⓘ
Returns an iterator from smallest to biggest chunk.
sourcepub fn big_to_small(self) -> ChunkPrevIter<'a, UP> ⓘ
pub fn big_to_small(self) -> ChunkPrevIter<'a, UP> ⓘ
Returns an iterator from biggest to smallest chunk.
Trait Implementations§
impl<const UP: bool> Copy for Stats<'_, UP>
impl<const UP: bool> Eq for Stats<'_, UP>
Auto Trait Implementations§
impl<'a, const UP: bool> Freeze for Stats<'a, UP>
impl<'a, const UP: bool> !RefUnwindSafe for Stats<'a, UP>
impl<'a, const UP: bool> !Send for Stats<'a, UP>
impl<'a, const UP: bool> !Sync for Stats<'a, UP>
impl<'a, const UP: bool> Unpin for Stats<'a, UP>
impl<'a, const UP: bool> !UnwindSafe for Stats<'a, 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