pub struct QMetaObjectConnectionGuard { /* private fields */ }
Expand description
Represents a guard to a signal-slot (or signal-functor) connection.
This struct can be created from a QMetaObjectConnection.
Note that when this struct is dropped the connection is disconnected.
So to keep a connection active either hold onto the struct for the duration
that the connection should be active or call release
, hence the #[must_use]
.
Implementations§
Source§impl QMetaObjectConnectionGuard
impl QMetaObjectConnectionGuard
Sourcepub fn release(self) -> QMetaObjectConnection
pub fn release(self) -> QMetaObjectConnection
Release the connection without disconnecting
Trait Implementations§
Source§impl Drop for QMetaObjectConnectionGuard
impl Drop for QMetaObjectConnectionGuard
Source§impl From<QMetaObjectConnection> for QMetaObjectConnectionGuard
impl From<QMetaObjectConnection> for QMetaObjectConnectionGuard
Source§fn from(connection: QMetaObjectConnection) -> QMetaObjectConnectionGuard
fn from(connection: QMetaObjectConnection) -> QMetaObjectConnectionGuard
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QMetaObjectConnectionGuard
impl RefUnwindSafe for QMetaObjectConnectionGuard
impl Send for QMetaObjectConnectionGuard
impl Sync for QMetaObjectConnectionGuard
impl Unpin for QMetaObjectConnectionGuard
impl UnwindSafe for QMetaObjectConnectionGuard
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