pub struct PinWeak<T>(/* private fields */);
Expand description
Safe Pinned Weak references.
Pin<Arc<T>>
can’t be converted to/from Weak safely, because there is know way to know if a given
weak reference came from a pinned Arc. This wraps the weak reference in a new type so we know
that it came from a pinned Arc.
There is a pin-weak crate that provides this for std::sync::Arc
, but not for the one in the
portable-atomic-utils crate.
Implementations§
Auto Trait Implementations§
impl<T> Freeze for PinWeak<T>
impl<T> RefUnwindSafe for PinWeak<T>where
T: RefUnwindSafe,
impl<T> Send for PinWeak<T>
impl<T> Sync for PinWeak<T>
impl<T> Unpin for PinWeak<T>
impl<T> UnwindSafe for PinWeak<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