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]
impl<T> DependentArc<T>
pub fn new(item: T) -> DependentArc<T>
[src]
pub fn new(item: T) -> DependentArc<T>
Methods from Deref<Target = Arc<T>>
Trait Implementations
impl<T> Deref for DependentArc<T>
[src]
impl<T> Deref for DependentArc<T>
type Target = Arc<T>
The resulting type after dereferencing.
fn deref(&self) -> &Arc<T>
[src]
fn deref(&self) -> &Arc<T>
Dereferences the value.
impl<T> DerefMut for DependentArc<T>
[src]
impl<T> DerefMut for DependentArc<T>
impl<T> AsRef<Arc<T>> for DependentArc<T>
[src]
impl<T> AsRef<Arc<T>> for DependentArc<T>
Returns a reference to the underlying Arc
struct
impl<T> AsMut<Arc<T>> for DependentArc<T>
[src]
impl<T> AsMut<Arc<T>> for DependentArc<T>
Returns a mutable reference to the underlying Arc
struct
impl<T> From<Arc<T>> for DependentArc<T>
[src]
impl<T> From<Arc<T>> for DependentArc<T>
Constructs a DependentArc from a Arc
, imbuing it with the capability to produce views.
fn from(item: Arc<T>) -> DependentArc<T>
[src]
fn from(item: Arc<T>) -> DependentArc<T>
Performs the conversion.
impl<T> Into<Arc<T>> for DependentArc<T>
[src]
impl<T> Into<Arc<T>> for DependentArc<T>
Unwraps the DependentArc
, returning it's internal Arc
Note: This will invalidate all Weak<Trait>
views you have constructed from this object.
Auto Trait Implementations
impl<T> Send for DependentArc<T> where
T: Send + Sync,
impl<T> Send for DependentArc<T> where
T: Send + Sync,
impl<T> Sync for DependentArc<T> where
T: Send + Sync,
impl<T> Sync for DependentArc<T> where
T: Send + Sync,