[][src]Struct zerogc_simple::Gc

pub struct Gc<'gc, T: GcSafe + 'gc> { /* fields omitted */ }

A garbage collected pointer

See docs for zerogc::GcRef

Trait Implementations

impl<'gc, T: GcSafe + 'gc> Clone for Gc<'gc, T>[src]

impl<'gc, T: GcSafe + 'gc> Copy for Gc<'gc, T>[src]

impl<'gc, T: GcSafe + Debug + 'gc> Debug for Gc<'gc, T>[src]

impl<'gc, T: GcSafe + 'gc> Deref for Gc<'gc, T>[src]

type Target = &'gc T

The resulting type after dereferencing.

impl<'gc, T: GcSafe + Eq + 'gc> Eq for Gc<'gc, T>[src]

impl<'gc, 'new_gc, T> GcBrand<'new_gc, SimpleCollector> for Gc<'gc, T> where
    T: GcSafe + GcBrand<'new_gc, SimpleCollector>,
    T::Branded: GcSafe
[src]

Rebrand

type Branded = Gc<'new_gc, <T as GcBrand<'new_gc, SimpleCollector>>::Branded>

This type with all garbage collected lifetimes changed to 'new_gc Read more

impl<'gc, T> GcCreateHandle<'gc, T> for Gc<'gc, T> where
    T: GcSafe,
    T: GcBrand<'static, SimpleCollector>,
    T::Branded: GcSafe
[src]

We support handles

type Handle = GcHandle<T::Branded>

The type of handles to this object.

impl<'gc, T, V> GcDirectBarrier<'gc, Gc<'gc, T>> for Gc<'gc, V> where
    T: GcSafe + 'gc,
    V: GcSafe + 'gc, 
[src]

Simple GC doesn't need write barriers :)

This implementation is just for writing Gc<T> -> Gc<T>

impl<'gc, T: GcSafe + 'gc> GcRef<'gc, T> for Gc<'gc, T>[src]

type System = SimpleCollector

The type of the garbage collection system that created this pointer Read more

impl<'gc, T: GcSafe + 'gc> GcSafe for Gc<'gc, T>[src]

Double-indirection is completely safe

impl<'gc, T: GcSafe + Hash + 'gc> Hash for Gc<'gc, T>[src]

impl<'gc, T: GcSafe + PartialEq + 'gc> PartialEq<Gc<'gc, T>> for Gc<'gc, T>[src]

impl<'gc, T: GcSafe + PartialEq + 'gc> PartialEq<T> for Gc<'gc, T>[src]

impl<'gc, T: GcSafe + Sync> Send for Gc<'gc, T>[src]

In order to send references between threads, the underlying type must be sync.

This is the same reason that Arc<T>: Send requires T: Sync

impl<'gc, T: GcSafe + Sync> Sync for Gc<'gc, T>[src]

If the underlying type is Sync, it's safe to share garbage collected references between threads.

The collector itself is always safe :D

impl<'gc, T: GcSafe + 'gc> Trace for Gc<'gc, T>[src]

Auto Trait Implementations

impl<'gc, T> !RefUnwindSafe for Gc<'gc, T>

impl<'gc, T> Unpin for Gc<'gc, T>

impl<'gc, T> !UnwindSafe for Gc<'gc, T>

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.