[][src]Struct glsp::RGc

pub struct RGc<T>(_, _);

A strongly-typed, weakly-rooted pointer to an RData.

Equivalent to a Gc<RData>, but it enforces that the RData must contain a value of type T.

RGc is to Gc as RRoot is to Root. For more details, consult the documentation of those types.

Construct an RGc by calling RRoot::downgrade. The RGc itself is an opaque struct which can't do anything useful. Instead, convert it to an RRoot by calling its upgrade method.

Implementations

impl<T> RGc<T>[src]

pub fn upgrade(&self) -> Option<RRoot<T>>[src]

Attempts to construct an RRoot based on this RGc.

Returns None if this RGc points to a heap-allocated object which has been deallocated by the garbage collector. To prevent this, use glsp::write_barrier and RClassBuilder::trace.

Trait Implementations

impl<T> Clone for RGc<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for RGc<T>[src]

impl<T> !Send for RGc<T>[src]

impl<T> !Sync for RGc<T>[src]

impl<T> Unpin for RGc<T>[src]

impl<T> !UnwindSafe for RGc<T>[src]

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> Erased for T

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

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

impl<T> IntoElement<Slot> for T where
    T: IntoVal
[src]

impl<T> IntoVal for T where
    T: StaticMarker, 
[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.