Struct libp2p::core::network::peer::DialingPeer [−][src]
pub struct DialingPeer<'a, TTrans, THandler> where
TTrans: Transport,
THandler: IntoConnectionHandler, { /* fields omitted */ }
Expand description
The representation of a peer in a Network
to whom a dialing
attempt is ongoing. There may already exist other established
connections to this peer.
Implementations
impl<'a, TTrans, THandler> DialingPeer<'a, TTrans, THandler> where
TTrans: Transport,
THandler: IntoConnectionHandler,
<TTrans as Transport>::Error: 'static,
<TTrans as Transport>::Error: Send,
impl<'a, TTrans, THandler> DialingPeer<'a, TTrans, THandler> where
TTrans: Transport,
THandler: IntoConnectionHandler,
<TTrans as Transport>::Error: 'static,
<TTrans as Transport>::Error: Send,
Disconnects from this peer, closing all established connections and aborting all dialing attempts.
Checks whether there is an established connection to the peer.
Returns true
iff DialingPeer::into_connected
returns Some
.
Converts the peer into a ConnectedPeer
, if an established connection exists.
Obtains a dialing attempt to the peer by connection ID of the current connection attempt.
Gets an iterator over all dialing (i.e. pending outgoing) connections to the peer.
Obtains some dialing connection to the peer.
At least one dialing connection is guaranteed to exist on a DialingPeer
.