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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)