pub trait GcRoot {
// Required methods
fn scan(&self) -> Vec<GcHandle>;
fn description(&self) -> String;
// Provided methods
fn estimated_size(&self) -> usize { ... }
fn is_active(&self) -> bool { ... }
}Expand description
Source of GC handles that must be treated as roots during collection.
Required Methods§
Sourcefn description(&self) -> String
fn description(&self) -> String
Get a human-readable description of this root source.
Provided Methods§
Sourcefn estimated_size(&self) -> usize
fn estimated_size(&self) -> usize
Get the estimated size of values reachable from this root source.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".