[−][src]Struct zerogc_context::collector::CollectorRef
A reference to the collector.
TODO: Devise better name
Implementations
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]
The id of this collector
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]
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<'gc, T, C> GcHandleSystem<'gc, T> for CollectorRef<C> where
C: RawHandleImpl,
T: GcSafe + 'gc,
T: GcBrand<'static, CollectorId<C>>,
T::Branded: GcSafe,
[src]
C: RawHandleImpl,
T: GcSafe + 'gc,
T: GcBrand<'static, CollectorId<C>>,
T::Branded: GcSafe,
We support handles
type Handle = GcHandle<T::Branded, C>
The type of handles to this object.
pub fn create_handle(gc: Gc<'gc, T, CollectorId<C>>) -> Self::Handle
[src]
impl<C: RawCollectorImpl> GcSystem for CollectorRef<C>
[src]
type Id = CollectorId<C>
The type of collector IDs given by this system
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,
[src]
<C as RawCollectorImpl>::Ptr: RefUnwindSafe,
impl<C> Unpin for CollectorRef<C> where
<C as RawCollectorImpl>::Ptr: Unpin,
[src]
<C as RawCollectorImpl>::Ptr: Unpin,
impl<C> UnwindSafe for CollectorRef<C> where
<C as RawCollectorImpl>::Ptr: UnwindSafe,
[src]
<C as RawCollectorImpl>::Ptr: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,