pub(crate) struct ProtectedWeak<P: ?Sized>(Weak<P>);Expand description
A Weak<P>, but upgradeable only to a ProtectedArc, not a raw Arc.
Tuple Fields§
§0: Weak<P>Implementations§
Source§impl<P: ?Sized> ProtectedWeak<P>
 
impl<P: ?Sized> ProtectedWeak<P>
Sourcepub(crate) fn upgrade(&self) -> Option<ProtectedArc<P>>
 
pub(crate) fn upgrade(&self) -> Option<ProtectedArc<P>>
Upgrade a ProtectedWeak to a ProtectedArc, if it’s not been garbage collected
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for ProtectedWeak<P>where
    P: ?Sized,
impl<P> RefUnwindSafe for ProtectedWeak<P>where
    P: RefUnwindSafe + ?Sized,
impl<P> Send for ProtectedWeak<P>
impl<P> Sync for ProtectedWeak<P>
impl<P> Unpin for ProtectedWeak<P>where
    P: ?Sized,
impl<P> UnwindSafe for ProtectedWeak<P>where
    P: RefUnwindSafe + ?Sized,
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
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
 
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more