pub struct HighPerformanceGC { /* private fields */ }Expand description
High-performance garbage collector with safe handle-based design
Implementations§
Source§impl HighPerformanceGC
impl HighPerformanceGC
pub fn new() -> Result<Self>
pub fn with_config(config: GcConfig) -> Result<Self>
Sourcepub fn collect_minor(&self) -> Result<usize>
pub fn collect_minor(&self) -> Result<usize>
Perform minor collection (young generation)
Sourcepub fn collect_major(&self) -> Result<usize>
pub fn collect_major(&self) -> Result<usize>
Perform major collection (all generations)
Sourcepub fn add_root(&self, root: GcPtr<Value>) -> Result<()>
pub fn add_root(&self, root: GcPtr<Value>) -> Result<()>
Add a root to protect an object from collection
Sourcepub fn get_config(&self) -> GcConfig
pub fn get_config(&self) -> GcConfig
Get the current GC configuration
Trait Implementations§
impl Send for HighPerformanceGC
impl Sync for HighPerformanceGC
Auto Trait Implementations§
impl !Freeze for HighPerformanceGC
impl !RefUnwindSafe for HighPerformanceGC
impl Unpin for HighPerformanceGC
impl !UnwindSafe for HighPerformanceGC
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