pub struct WeakRefNotify<T: ObjectType> { /* private fields */ }
Expand description
A handle to disconnect a weak ref notify closure.
Implementations§
Source§impl<T: ObjectType> WeakRefNotify<T>
impl<T: ObjectType> WeakRefNotify<T>
Sourcepub 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