pub struct Config { /* private fields */ }auto-collect only.Expand description
The configuration of the garbage collector.
Implementations§
source§impl Config
impl Config
sourcepub fn auto_collect(&self) -> bool
pub fn auto_collect(&self) -> bool
Returns true if collections can be automatically started, false otherwise.
sourcepub fn set_auto_collect(&mut self, auto_collect: bool)
pub fn set_auto_collect(&mut self, auto_collect: bool)
Sets whether collections can be automatically started.
sourcepub fn adjustment_percent(&self) -> f64
pub fn adjustment_percent(&self) -> f64
Returns the threshold adjustment percent.
See the module-level documentation for more details.
sourcepub fn set_adjustment_percent(&mut self, percent: f64)
pub fn set_adjustment_percent(&mut self, percent: f64)
Sets the threshold adjustment percent.
See the module-level documentation for more details.
§Panics
Panics if the provided percent isn’t between 0 and 1 (included).
sourcepub fn buffered_objects_threshold(&self) -> Option<NonZeroUsize>
pub fn buffered_objects_threshold(&self) -> Option<NonZeroUsize>
Returns the buffered-objects threshold (see Cc::mark_alive).
Returns None if this parameter isn’t used to start a collection.
See the module-level documentation for more details.
sourcepub fn set_buffered_objects_threshold(
&mut self,
threshold: Option<NonZeroUsize>,
)
pub fn set_buffered_objects_threshold( &mut self, threshold: Option<NonZeroUsize>, )
Sets the buffered-objects threshold (see Cc::mark_alive).
If the provided threshold is None, then this parameter will not be used to start a collection.
See the module-level documentation for more details.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)