From 5c11f4a9e42f7675c58c1604ed7039a7740e582d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Oliveira?= Date: Fri, 2 Aug 2024 12:05:54 +0100 Subject: [PATCH] docs(swarm): doc DialError::Denied Pull-Request: #5510. --- swarm/src/lib.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index 31eb2aa28f5..03e30240771 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -1538,9 +1538,7 @@ impl Config { #[derive(Debug)] pub enum DialError { /// The peer identity obtained on the connection matches the local peer. - LocalPeerId { - endpoint: ConnectedPoint, - }, + LocalPeerId { endpoint: ConnectedPoint }, /// No addresses have been provided by [`NetworkBehaviour::handle_pending_outbound_connection`] and [`DialOpts`]. NoAddresses, /// The provided [`dial_opts::PeerCondition`] evaluated to false and thus @@ -1553,9 +1551,10 @@ pub enum DialError { obtained: PeerId, endpoint: ConnectedPoint, }, - Denied { - cause: ConnectionDenied, - }, + /// One of the [`NetworkBehaviour`]s rejected the outbound connection + /// via [`NetworkBehaviour::handle_pending_outbound_connection`] or + /// [`NetworkBehaviour::handle_established_outbound_connection`]. + Denied { cause: ConnectionDenied }, /// An error occurred while negotiating the transport protocol(s) on a connection. Transport(Vec<(Multiaddr, TransportError)>), }