pub struct ConnectedPeer<'a, TTrans, THandler> where
    TTrans: Transport,
    THandler: IntoConnectionHandler
{ /* private fields */ }
Expand description

The representation of a peer in a Network to whom at least one established connection exists. There may also be additional ongoing dialing attempts to the peer.

Implementations

Returns the ConnectedPeer into a Peer.

Obtains an established connection to the peer by ID.

The number of established connections to the peer.

Checks whether there is an ongoing dialing attempt to the peer.

Returns true iff ConnectedPeer::into_dialing returns Some.

Converts this peer into a DialingPeer, if there is an ongoing dialing attempt, None otherwise.

Gets an iterator over all established connections to the peer.

Obtains some established connection to the peer.

Disconnects from the peer, closing all connections.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.