Enum zerogc_context::ContextState[][src]

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

Variants

Active
Expand description

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
Expand description

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.

Show fields

Fields of SafePoint

collection_id: u64
Expand description

The id of the collection we are waiting for

Frozen
Expand description

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]

fn clone(&self) -> ContextState[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ContextState[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl PartialEq<ContextState> for ContextState[src]

fn eq(&self, other: &ContextState) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &ContextState) -> bool[src]

This method tests for !=.

impl Copy for ContextState[src]

impl Eq 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]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

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