pub struct WeakSignalSubscription(/* private fields */);Expand description
A weak subscription to a D-Bus signal.
Like SignalSubscription but hold only a weak reference to the D-Bus
connection the signal is subscribed on, i.e. maintain the subscription on
the D-Bus signal only as long as some strong reference exists on the
corresponding D-Bus connection.
When dropped, unsubscribes from signal on the connection if it still exists, and then drop the reference on the connection. If no other strong reference on the connection exists the connection is closed and destroyed.
Implementations§
Source§impl WeakSignalSubscription
impl WeakSignalSubscription
Sourcepub fn upgrade(self) -> Option<SignalSubscription>
pub fn upgrade(self) -> Option<SignalSubscription>
Upgrade this signal subscription to a strong one.
Trait Implementations§
Source§impl Debug for WeakSignalSubscription
impl Debug for WeakSignalSubscription
Auto Trait Implementations§
impl Freeze for WeakSignalSubscription
impl RefUnwindSafe for WeakSignalSubscription
impl Send for WeakSignalSubscription
impl Sync for WeakSignalSubscription
impl Unpin for WeakSignalSubscription
impl UnwindSafe for WeakSignalSubscription
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