pub trait GCIntegration {
// Required methods
fn maybe_collect_garbage(&mut self);
fn force_gc(&mut self) -> GCResult;
fn gc_stats(&self) -> GCStats;
fn gc_heap_size(&self) -> usize;
fn gc_object_count(&self) -> usize;
fn gc(&self) -> &GarbageCollector;
fn gc_mut(&mut self) -> &mut GarbageCollector;
}Expand description
Garbage collection integration for VirtualMachine
Required Methods§
Sourcefn maybe_collect_garbage(&mut self)
fn maybe_collect_garbage(&mut self)
Maybe trigger garbage collection based on config
Sourcefn gc_heap_size(&self) -> usize
fn gc_heap_size(&self) -> usize
Get GC heap size
Sourcefn gc_object_count(&self) -> usize
fn gc_object_count(&self) -> usize
Get GC object count
Sourcefn gc(&self) -> &GarbageCollector
fn gc(&self) -> &GarbageCollector
Access the garbage collector
Sourcefn gc_mut(&mut self) -> &mut GarbageCollector
fn gc_mut(&mut self) -> &mut GarbageCollector
Access the garbage collector mutably
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl GCIntegration for VirtualMachine
Available on non-crate feature
gc only.