Struct zerogc_context::CollectorContext[][src]

pub struct CollectorContext<C: RawCollectorImpl> { /* fields omitted */ }

Implementations

impl<C: RawCollectorImpl> CollectorContext<C>[src]

pub fn collector(&self) -> &C[src]

Trait Implementations

impl<C: RawCollectorImpl> Drop for CollectorContext<C>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl<C: RawCollectorImpl> GcContext for CollectorContext<C>[src]

type System = CollectorRef<C>

The system used with this context

type Id = CollectorId<C>

The type of ids used in the system

unsafe fn basic_safepoint<T: Trace>(&mut self, value: &mut &mut T)[src]

Inform the garbage collection system we are at a safepoint and are ready for a potential garbage collection. Read more

unsafe fn freeze(&mut self)[src]

Inform the garbage collection system we are at a safepoint and are ready for a potential garbage collection. Read more

unsafe fn unfreeze(&mut self)[src]

Unfreeze this context, allowing it to be used again. Read more

unsafe fn recurse_context<T, F, R>(&self, value: &mut &mut T, func: F) -> R where
    T: Trace,
    F: for<'gc> FnOnce(&'gc mut Self, &'gc mut T) -> R, 
[src]

Invoke the closure with a temporary GcContext. Read more

impl<'gc, T, C> GcSimpleAlloc<'gc, T> for CollectorContext<C> where
    T: GcSafe + 'gc,
    C: RawSimpleAlloc<'gc, T>, 
[src]

type Gc = C::Gc

The type of the garbage collected pointers that are being allocated

fn alloc(&'gc self, value: T) -> C::Gc[src]

Allocate the specified object in this garbage collector, binding it to the lifetime of this collector. Read more

impl<C: RawCollectorImpl> !Send for CollectorContext<C>[src]

It’s not safe for a context to be sent across threads.

We use (thread-unsafe) interior mutability to maintain the shadow stack. Since we could potentially be cloned via safepoint_recurse!, implementing Send would allow another thread to obtain a reference to our internal &RefCell. Further mutation/access would be undefined…..

Auto Trait Implementations

impl<C> RefUnwindSafe for CollectorContext<C> where
    <C as RawCollectorImpl>::RawContext: RefUnwindSafe

impl<C> !Sync for CollectorContext<C>

impl<C> Unpin for CollectorContext<C>

impl<C> UnwindSafe for CollectorContext<C> where
    <C as RawCollectorImpl>::RawContext: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.