Struct bump_scope::UninitStats
source · pub struct UninitStats<'a, const UP: bool> {
pub current: Option<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: Option<Chunk<'a, UP>>This is the chunk we are currently allocating on.
Implementations§
source§impl<'a, const UP: bool> UninitStats<'a, UP>
impl<'a, const UP: bool> UninitStats<'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§
source§impl<const UP: bool> Clone for UninitStats<'_, UP>
impl<const UP: bool> Clone for UninitStats<'_, UP>
source§impl<'a, const UP: bool> Debug for UninitStats<'a, UP>
impl<'a, const UP: bool> Debug for UninitStats<'a, UP>
source§impl<const UP: bool> PartialEq for UninitStats<'_, UP>
impl<const UP: bool> PartialEq for UninitStats<'_, UP>
impl<const UP: bool> Copy for UninitStats<'_, UP>
impl<const UP: bool> Eq for UninitStats<'_, UP>
Auto Trait Implementations§
impl<'a, const UP: bool> Freeze for UninitStats<'a, UP>
impl<'a, const UP: bool> !RefUnwindSafe for UninitStats<'a, UP>
impl<'a, const UP: bool> !Send for UninitStats<'a, UP>
impl<'a, const UP: bool> !Sync for UninitStats<'a, UP>
impl<'a, const UP: bool> Unpin for UninitStats<'a, UP>
impl<'a, const UP: bool> !UnwindSafe for UninitStats<'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