pub struct RootScanner { /* private fields */ }Expand description
Manages all GC roots in the system
Implementations§
Source§impl RootScanner
impl RootScanner
pub fn new() -> Self
Sourcepub fn unregister_root(&self, root_id: RootId) -> Result<()>
pub fn unregister_root(&self, root_id: RootId) -> Result<()>
Unregister a GC root
Sourcepub fn scan_roots(&self) -> Result<Vec<GcPtr<Value>>>
pub fn scan_roots(&self) -> Result<Vec<GcPtr<Value>>>
Scan all roots and return reachable objects
Sourcepub fn stats(&self) -> RootScannerStats
pub fn stats(&self) -> RootScannerStats
Get scanner statistics
Sourcepub fn cleanup_inactive_roots(&self) -> usize
pub fn cleanup_inactive_roots(&self) -> usize
Remove all inactive roots
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RootScanner
impl !RefUnwindSafe for RootScanner
impl Send for RootScanner
impl Sync for RootScanner
impl Unpin for RootScanner
impl !UnwindSafe for RootScanner
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