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
impl<C: RawCollectorImpl> CollectorRef<C>
[src]
impl<C: RawCollectorImpl> CollectorRef<C>
[src]pub fn create() -> Self where
C::Ptr: CollectorInit<C>,
[src]
C::Ptr: CollectorInit<C>,
pub fn with_logger(logger: Logger) -> Self where
C::Ptr: CollectorInit<C>,
[src]
C::Ptr: CollectorInit<C>,
pub fn as_raw(&self) -> &C
[src]
pub fn id(&self) -> CollectorId<C>
[src]
pub fn id(&self) -> CollectorId<C>
[src]The id of this collector
pub fn into_context(self) -> CollectorContext<C>
[src]
pub fn into_context(self) -> CollectorContext<C>
[src]Convert this collector into a unique context
The single-threaded implementation only allows a single context, so this method is nessicary to support it.
impl<C: SyncCollector> CollectorRef<C>
[src]
impl<C: SyncCollector> CollectorRef<C>
[src]pub fn create_context(&self) -> CollectorContext<C>
[src]
pub fn create_context(&self) -> CollectorContext<C>
[src]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<C: RawCollectorImpl> Drop for CollectorRef<C>
[src]
impl<C: RawCollectorImpl> Drop for CollectorRef<C>
[src]impl<'gc, 'a, T, C> GcHandleSystem<'gc, 'a, T> for CollectorRef<C> where
C: RawHandleImplHack<'gc, T>,
T: GcSafe + 'gc,
T: GcErase<'a, CollectorId<C>>,
T::Erased: GcSafe,
[src]
impl<'gc, 'a, T, C> GcHandleSystem<'gc, 'a, T> for CollectorRef<C> where
C: RawHandleImplHack<'gc, T>,
T: GcSafe + 'gc,
T: GcErase<'a, CollectorId<C>>,
T::Erased: GcSafe,
[src]We support handles
impl<C: RawCollectorImpl> GcSystem for CollectorRef<C>
[src]
impl<C: RawCollectorImpl> GcSystem for CollectorRef<C>
[src]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
impl<C: SyncCollector> Send for CollectorRef<C>
[src]
We actually are thread safe ;)
impl<C: SyncCollector> Sync for CollectorRef<C>
[src]
Auto Trait Implementations
impl<C> RefUnwindSafe for CollectorRef<C> where
<C as RawCollectorImpl>::Ptr: RefUnwindSafe,
<C as RawCollectorImpl>::Ptr: RefUnwindSafe,
impl<C> Unpin for CollectorRef<C> where
<C as RawCollectorImpl>::Ptr: Unpin,
<C as RawCollectorImpl>::Ptr: Unpin,
impl<C> UnwindSafe for CollectorRef<C> where
<C as RawCollectorImpl>::Ptr: UnwindSafe,
<C as RawCollectorImpl>::Ptr: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,