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