Struct zerogc_context::collector::CollectorRef [−][src]
#[repr(C)]pub struct CollectorRef<C: RawCollectorImpl> { /* fields omitted */ }
Expand description
A reference to the collector.
TODO: Devise better name
Implementations
The id of this collector
Convert this collector into a unique context
The single-threaded implementation only allows a single context, so this method is nessicary to support it.
Create a new context bound to this collector
Warning: Only one collector should be created per thread. Doing otherwise can cause deadlocks/panics.
Trait Implementations
impl<'gc, 'a, T, C> GcHandleSystem<'gc, 'a, T> for CollectorRef<C> where
C: RawHandleImpl,
T: GcSafe + 'gc,
T: GcErase<'a, CollectorId<C>>,
T::Erased: GcSafe + Sized,
impl<'gc, 'a, T, C> GcHandleSystem<'gc, 'a, T> for CollectorRef<C> where
C: RawHandleImpl,
T: GcSafe + 'gc,
T: GcErase<'a, CollectorId<C>>,
T::Erased: GcSafe + Sized,
We support handles
type Id = CollectorId<C>
type Id = CollectorId<C>
The type of collector IDs given by this system
type Context = CollectorContext<C>
type Context = CollectorContext<C>
The type of contexts used in this sytem
We actually are thread safe ;)