[][src]Struct zerogc::cell::GcCell

pub struct GcCell<T: Trace + Copy>(_);

A Cell pointing to a garbage collected object.

Either this or a GcRefCell is needed in order to mutate a garbage collected object, since garbage collected pointers are otherwise immutable after allocation. Unlike a regular Cell this type implements GarbageCollected, and may eventually have read/write barriers.

Implementations

impl<T: Trace + Copy> GcCell<T>[src]

pub fn new(value: T) -> Self[src]

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

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

pub fn set(&self, value: T)[src]

Trait Implementations

impl<T: Clone + Trace + Copy> Clone for GcCell<T>[src]

impl<T: Debug + Trace + Copy> Debug for GcCell<T>[src]

impl<T: Default + Trace + Copy> Default for GcCell<T>[src]

impl<T: GcSafe + Copy> GcSafe for GcCell<T>[src]

const NEEDS_DROP: bool[src]

Since T is Copy, we shouldn't need to be dropped

Still delegating just in case

impl<T: GcSafe + Copy + NullTrace> NullTrace for GcCell<T>[src]

impl<T: Trace + Copy> Trace for GcCell<T>[src]

impl<T: GcSafe + Copy> TraceImmutable for GcCell<T>[src]

Since a cell has interior mutablity, it can implement TraceImmutable even if the interior type is only Trace

Auto Trait Implementations

impl<T> !RefUnwindSafe for GcCell<T>

impl<T> Send for GcCell<T> where
    T: Send

impl<T> !Sync for GcCell<T>

impl<T> Unpin for GcCell<T> where
    T: Unpin

impl<T> UnwindSafe for GcCell<T> where
    T: UnwindSafe

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> 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.