pub struct ChildArc<T> { /* private fields */ }
Expand description
Unclonable owned reference to a ParentArc
.
This type can be dereferenced into the underlying data.
§Examples
use parc::{ParentArc, LockWeak, ChildArc};
use std::sync::Mutex;
fn main() {
let parent = ParentArc::new(Mutex::new(true));
let weak: LockWeak<_> = ParentArc::downgrade(&parent);
let child: ChildArc<_> = weak.upgrade().unwrap();
assert!(*child.lock().unwrap());
}
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ChildArc<T>
impl<T> RefUnwindSafe for ChildArc<T>where
T: RefUnwindSafe,
impl<T> !Send for ChildArc<T>
impl<T> !Sync for ChildArc<T>
impl<T> Unpin for ChildArc<T>
impl<T> UnwindSafe for ChildArc<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more