[][src]Struct pgc::Gc

pub struct Gc<T: ?Sized + GcObject> { /* fields omitted */ }

A garbage-collected pointer type

Methods

impl<T: Sized + GcObject + 'static> Gc<T>[src]

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

Constructs a new Gc<T> with the given value.

Collection

This method could trigger a garbage collection.

impl<T: ?Sized + GcObject> Gc<T>[src]

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

Get reference to data

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

Get mutable reference to data. WARNING: Should be used carefully since Rust does not allows two mutable pointers to same data.

pub fn ref_eq(&self, other: Gc<dyn GcObject>) -> bool[src]

Compares two pointers

Trait Implementations

impl<T: GcObject + 'static> GcObject for Gc<T>[src]

impl<T: ?Sized + GcObject> Send for Gc<T>[src]

impl<T: Eq + PartialEq + GcObject> Eq for Gc<T>[src]

impl<T: ?Sized + GcObject + Sync> Sync for Gc<T>[src]

impl<T: ?Sized + GcObject> Clone for Gc<T>[src]

impl<T: PartialOrd + GcObject> PartialOrd<Gc<T>> for Gc<T>[src]

impl<T: PartialEq + GcObject> PartialEq<Gc<T>> for Gc<T>[src]

impl<T: PartialOrd + Ord + GcObject> Ord for Gc<T>[src]

impl<T: GcObject + 'static> From<Rooted<T>> for Gc<T>[src]

impl<T: ?Sized + GcObject> Copy for Gc<T>[src]

impl<T: GcObject + ?Sized + Unsize<U>, U: GcObject + ?Sized> CoerceUnsized<Gc<U>> for Gc<T>[src]

impl<T: Hash + GcObject> Hash for Gc<T>[src]

impl<T: GcObject + ?Sized> Deref for Gc<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Debug + GcObject> Debug for Gc<T>[src]

impl<T: Display + GcObject> Display for Gc<T>[src]

Auto Trait Implementations

impl<T: ?Sized> Unpin for Gc<T>

impl<T: ?Sized> UnwindSafe for Gc<T> where
    T: RefUnwindSafe

impl<T: ?Sized> RefUnwindSafe for Gc<T> where
    T: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,