Skip to main content

Trace

Trait Trace 

Source
pub trait Trace {
    // Required method
    fn trace(&self, tracer: &mut Tracer<'_>);
}
Expand description

Types that may own Gc handles.

Implementations must visit every Gc field, directly or through another type that implements Trace. Missing an edge makes the collector treat the object as unreachable from that side, which only costs memory (a cycle that is never reclaimed), never safety — but it is still a bug.

Required Methods§

Source

fn trace(&self, tracer: &mut Tracer<'_>)

Report every Gc owned by self to tracer.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Trace for &'static str

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for ()

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for String

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for bool

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for char

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for f32

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for f64

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for i8

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for i16

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for i32

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for i64

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for i128

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for isize

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for u8

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for u16

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for u32

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for u64

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for u128

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl Trace for usize

Source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Source§

impl<T, U> Trace for (T, U)
where T: Trace, U: Trace,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T, const N: usize> Trace for [T; N]
where T: Trace,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for &T
where T: Trace + ?Sized,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for Box<T>
where T: Trace + ?Sized,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for Cell<T>
where T: Trace + Copy,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for Option<T>
where T: Trace,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for Rc<T>
where T: Trace,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for RefCell<T>
where T: Trace,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Source§

impl<T> Trace for Vec<T>
where T: Trace,

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Implementors§