[−][src]Struct glsp_engine::RGc
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,