Trait refuse::Trace

source ·
pub trait Trace: Send + Sync + 'static {
    const MAY_CONTAIN_REFERENCES: bool;

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

A type that can find and mark any references it has.

Required Associated Constants§

source

const MAY_CONTAIN_REFERENCES: bool

If true, this type may contain references and should have its trace() function invoked during the collector’s “mark” phase.

Required Methods§

source

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

Traces all refrences that this value references.

This function should invoke Tracer::mark() for each Ref<T> it contains. Failing to do so will allow the garbage collector to free the data, preventing the ability to load() the data in the future.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<K> Trace for BTreeSet<K>
where K: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

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

source§

impl<K> Trace for Set<K>
where K: Trace + Sort,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

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

source§

impl<K, S> Trace for HashSet<K, S>
where K: Trace, S: Send + Sync + 'static,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

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

source§

impl<K, V> Trace for BTreeMap<K, V>
where K: Trace, V: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

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

source§

impl<K, V> Trace for Map<K, V>
where K: Trace + Sort, V: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

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

source§

impl<K, V, S> Trace for HashMap<K, V, S>
where K: Trace, V: Trace, S: Send + Sync + 'static,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

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

source§

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

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

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

source§

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

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

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

source§

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

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

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

source§

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

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

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

source§

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

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

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

Implementors§