Trait refuse::Collectable

source ·
pub trait Collectable: Trace + MapAs + Send + Sync + 'static { }
Expand description

A type that can be garbage collected.

A type needs to implement both Trace and MapAs to be collectable.

If a type can’t contain any Ref<T>s and no mapping functionality is desired, the SimpleType trait can be implemented instead of Trace and MapAs to enable collection.

If a type can’t contain any Ref<T>s, ContainsNoRefs can be implemented instead of Trace.

If no mapping functionality is desired, NoMapping can be implemented instead of MapAs.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Collectable for T
where T: Trace + MapAs + Send + Sync + 'static,