#[non_exhaustive]pub struct CollectStats {
pub live: usize,
pub freed: usize,
}Expand description
What a collect pass did.
Returned by Heap::collect. live + freed equals the number of objects that
were resident when the pass began.
The struct is #[non_exhaustive]: a later phase may report more (bytes
reclaimed, pause time), so construct it only through the collector and read the
fields you need.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.live: usizeObjects that survived the collection — the reachable set.
freed: usizeObjects reclaimed by the collection — the unreachable set.
Trait Implementations§
Source§impl Clone for CollectStats
impl Clone for CollectStats
Source§fn clone(&self) -> CollectStats
fn clone(&self) -> CollectStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CollectStats
Source§impl Debug for CollectStats
impl Debug for CollectStats
impl Eq for CollectStats
Source§impl PartialEq for CollectStats
impl PartialEq for CollectStats
Source§fn eq(&self, other: &CollectStats) -> bool
fn eq(&self, other: &CollectStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CollectStats
Auto Trait Implementations§
impl Freeze for CollectStats
impl RefUnwindSafe for CollectStats
impl Send for CollectStats
impl Sync for CollectStats
impl Unpin for CollectStats
impl UnsafeUnpin for CollectStats
impl UnwindSafe for CollectStats
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