Skip to content

Commit 5c11f4a

Browse files
authored
docs(swarm): doc DialError::Denied
Pull-Request: #5510.
1 parent 5b4c43c commit 5c11f4a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

swarm/src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,9 +1538,7 @@ impl Config {
15381538
#[derive(Debug)]
15391539
pub enum DialError {
15401540
/// The peer identity obtained on the connection matches the local peer.
1541-
LocalPeerId {
1542-
endpoint: ConnectedPoint,
1543-
},
1541+
LocalPeerId { endpoint: ConnectedPoint },
15441542
/// No addresses have been provided by [`NetworkBehaviour::handle_pending_outbound_connection`] and [`DialOpts`].
15451543
NoAddresses,
15461544
/// The provided [`dial_opts::PeerCondition`] evaluated to false and thus
@@ -1553,9 +1551,10 @@ pub enum DialError {
15531551
obtained: PeerId,
15541552
endpoint: ConnectedPoint,
15551553
},
1556-
Denied {
1557-
cause: ConnectionDenied,
1558-
},
1554+
/// One of the [`NetworkBehaviour`]s rejected the outbound connection
1555+
/// via [`NetworkBehaviour::handle_pending_outbound_connection`] or
1556+
/// [`NetworkBehaviour::handle_established_outbound_connection`].
1557+
Denied { cause: ConnectionDenied },
15591558
/// An error occurred while negotiating the transport protocol(s) on a connection.
15601559
Transport(Vec<(Multiaddr, TransportError<io::Error>)>),
15611560
}

0 commit comments

Comments
 (0)