use crate::GcHandle;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RootId(pub usize);
pub trait GcRoot {
fn scan(&self) -> Vec<GcHandle>;
fn description(&self) -> String;
fn estimated_size(&self) -> usize {
0
}
fn is_active(&self) -> bool {
true
}
}
#[derive(Debug, Clone)]
pub struct RootInfo {
pub id: RootId,
pub description: String,
pub estimated_size: usize,
pub is_active: bool,
}
#[derive(Debug, Clone)]
pub struct RootScannerStats {
pub registered_roots: usize,
pub scans_performed: usize,
pub total_roots_found: usize,
pub average_roots_per_scan: f64,
}