Skip to main content

RootSet

Trait RootSet 

Source
pub trait RootSet {
    // Required method
    fn push_roots(&self, out: &mut Vec<GcRef>);
}
Expand description

Anything that can enumerate the GC references it keeps alive (§12.3).

The collector treats every yielded GcRef (plus everything transitively reachable through it) as a root.

Required Methods§

Source

fn push_roots(&self, out: &mut Vec<GcRef>)

Push every root held by this set into out, in any order.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RootSet for ()

A no-roots impl so the top-level scope can be rooted on ().

Source§

fn push_roots(&self, _out: &mut Vec<GcRef>)

Implementors§