pub struct ConnectionImpl<const SCOPED: bool> { /* private fields */ }Expand description
The implementation used by both Connection and ScopedConnection. Takes a const bool parameter indicating whether it is a scoped connection or not.
Implementations§
Source§impl<const SCOPED: bool> ConnectionImpl<SCOPED>
impl<const SCOPED: bool> ConnectionImpl<SCOPED>
Sourcepub fn connected(&self) -> bool
pub fn connected(&self) -> bool
Returns true if the underlying slot is still connected, false otherwise. Will return false if the underlying signal no longer exists.
Sourcepub fn disconnect(&self)
pub fn disconnect(&self)
Disconnects the underlying slot. Further, repeated calls to disconnect will do nothing.
When a connection is disconnected its underlying slot is permanently removed from the the signal’s slot list.
Once disconnected, there is no way to re-connect a slot.
Sourcepub fn blocked(&self) -> bool
pub fn blocked(&self) -> bool
Returns true if the underlying slot is blocked, false otherwise. Will return true if either the underyling slot or underlying signal no longer exists.
Sourcepub fn blocker_count(&self) -> usize
pub fn blocker_count(&self) -> usize
Returns the number of SharedConnectionBlocks currently blocking the slot.
Will return usize::Max if either the underyling slot or underlying signal no longer exists.
Gets a SharedConnectionBlock that can be used to temporarily block the underlying slot.
Source§impl ConnectionImpl<false>
impl ConnectionImpl<false>
Sourcepub fn scoped(self) -> ScopedConnection
pub fn scoped(self) -> ScopedConnection
Consumes the connection and returns a ScopedConnection.
Trait Implementations§
Source§impl<const SCOPED: bool> Clone for ConnectionImpl<SCOPED>
impl<const SCOPED: bool> Clone for ConnectionImpl<SCOPED>
Source§fn clone(&self) -> ConnectionImpl<SCOPED>
fn clone(&self) -> ConnectionImpl<SCOPED>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more