Struct dependent_view::arc::DependentArc[][src]

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

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

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

Methods

impl<T> DependentArc<T>
[src]

Methods from Deref<Target = Arc<T>>

Trait Implementations

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

The resulting type after dereferencing.

Dereferences the value.

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

Mutably dereferences the value.

impl<T> AsRef<Arc<T>> for DependentArc<T>
[src]

Returns a reference to the underlying Arc struct

Performs the conversion.

impl<T> AsMut<Arc<T>> for DependentArc<T>
[src]

Returns a mutable reference to the underlying Arc struct

Performs the conversion.

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

Constructs a DependentArc from a Arc, imbuing it with the capability to produce views.

Performs the conversion.

impl<T> Into<Arc<T>> for DependentArc<T>
[src]

Unwraps the DependentArc, returning it's internal Arc

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

Performs the conversion.

Auto Trait Implementations

impl<T> Send for DependentArc<T> where
    T: Send + Sync

impl<T> Sync for DependentArc<T> where
    T: Send + Sync