Struct WeakRefNotify
pub struct WeakRefNotify<T>where
T: ObjectType,{ /* private fields */ }Expand description
A handle to disconnect a weak ref notify closure.
Implementations§
§impl<T> WeakRefNotify<T>where
T: ObjectType,
impl<T> WeakRefNotify<T>where
T: ObjectType,
pub fn upgrade(&self) -> Option<T>
pub fn upgrade(&self) -> Option<T>
Try to upgrade this weak reference to a strong reference.
If the stored object was already destroyed then None is returned.
pub fn disconnect(self)
Auto Trait Implementations§
impl<T> Freeze for WeakRefNotify<T>
impl<T> !RefUnwindSafe for WeakRefNotify<T>
impl<T> !Send for WeakRefNotify<T>
impl<T> !Sync for WeakRefNotify<T>
impl<T> Unpin for WeakRefNotify<T>
impl<T> !UnwindSafe for WeakRefNotify<T>
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