[][src]Enum zerogc_context::ContextState

pub enum ContextState {
    Active,
    SafePoint {
        collection_id: u64,
    },
    Frozen,
}

Variants

Active

The context is active.

Its contents are potentially being mutated, so the shadow_stack doesn't necessarily reflect the actual set of thread roots.

New objects could be allocated that are not actually being tracked in the shadow_stack.

SafePoint

The context is waiting at a safepoint for a collection to complete.

The mutating thread is blocked for the duration of the safepoint (until collection completes).

Therefore, its shadow_stack is guarenteed to reflect the actual set of thread roots.

Fields of SafePoint

collection_id: u64

The id of the collection we are waiting for

Frozen

The context is frozen. Allocation or mutation can't happen but the mutator thread isn't actually blocked.

Unlike a safepoint, this is explicitly unfrozen at the user's discretion.

Because no allocation or mutation can happen, its shadow_stack stack is guarenteed to accurately reflect the roots of the context.

Trait Implementations

impl Clone for ContextState[src]

impl Copy for ContextState[src]

impl Debug for ContextState[src]

impl Eq for ContextState[src]

impl PartialEq<ContextState> for ContextState[src]

impl StructuralEq for ContextState[src]

impl StructuralPartialEq for ContextState[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.