Struct dependent_view::rc::DependentRc[][src]

pub struct DependentRc<T> { /* fields omitted */ }

DependentRc<T> is a simple wrapper around the Rc<T> type, imbuing it with the capability to provide "views" (Weak<Trait>) of non-owned structs to separate components of a system.

Internally, it does this by retaining an Rc<Trait> for each view you make - thus when the DependentRc is dropped, all of the weak references are automatically invalidated.

Methods

impl<T> DependentRc<T>
[src]

Constructs a DependentRc by wrapping an underlying type

Methods from Deref<Target = Rc<T>>

Trait Implementations

impl<T> Deref for DependentRc<T>
[src]

The resulting type after dereferencing.

Dereferences the value.

impl<T> DerefMut for DependentRc<T>
[src]

Mutably dereferences the value.

impl<T> AsRef<Rc<T>> for DependentRc<T>
[src]

Returns a reference to the underlying Rc struct

Performs the conversion.

impl<T> AsMut<Rc<T>> for DependentRc<T>
[src]

Returns a mutable reference to the underlying Rc struct

Performs the conversion.

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

Constructs a DependentRc from an Rc, imbuing it with the capability to produce views.

Performs the conversion.

impl<T> Into<Rc<T>> for DependentRc<T>
[src]

Unwraps the DependentRc, returning it's internal Rc

Note: This will invalidate all Weak<Trait> views you have constructed from this object.

Performs the conversion.

Auto Trait Implementations

impl<T> !Send for DependentRc<T>

impl<T> !Sync for DependentRc<T>