Skip to main content

GCIntegration

Trait GCIntegration 

Source
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§

Source

fn maybe_collect_garbage(&mut self)

Maybe trigger garbage collection based on config

Source

fn force_gc(&mut self) -> GCResult

Force garbage collection

Source

fn gc_stats(&self) -> GCStats

Get GC statistics

Source

fn gc_heap_size(&self) -> usize

Get GC heap size

Source

fn gc_object_count(&self) -> usize

Get GC object count

Source

fn gc(&self) -> &GarbageCollector

Access the garbage collector

Source

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§

Source§

impl GCIntegration for VirtualMachine

Available on non-crate feature gc only.