pub struct GcState {
pub min_heap: usize,
pub growth_factor: f64,
pub limits: HeapLimits,
pub stats: GcStats,
pub record_pauses: bool,
pub pauses: Vec<Duration>,
/* private fields */
}Fields§
§min_heap: usize§growth_factor: f64§limits: HeapLimits§stats: GcStats§record_pauses: boolWhen set, every pause is appended to pauses.
pauses: Vec<Duration>Implementations§
Source§impl GcState
impl GcState
pub fn new(limits: HeapLimits) -> Self
Sourcepub fn configure(
&mut self,
min_heap: usize,
growth_factor: f64,
reserved: usize,
)
pub fn configure( &mut self, min_heap: usize, growth_factor: f64, reserved: usize, )
The trigger of a heap that has not collected yet and reserves
reserved bytes: min_heap bytes of budget, growth_factor for the
budgets after collections.
Sourcepub fn threshold(&self) -> usize
pub fn threshold(&self) -> usize
Nominal bytes that may be allocated before the next collection.
pub fn is_manual(&self) -> bool
Auto Trait Implementations§
impl Freeze for GcState
impl RefUnwindSafe for GcState
impl Send for GcState
impl Sync for GcState
impl Unpin for GcState
impl UnsafeUnpin for GcState
impl UnwindSafe for GcState
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