[−][src]Enum libp2p_core::nodes::raw_swarm::RawSwarmEvent
Event that can happen on the RawSwarm
.
Variants
ListenerClosed
One of the listeners gracefully closed.
Fields of ListenerClosed
IncomingConnection(IncomingConnectionEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr>)
A new connection arrived on a listener.
IncomingConnectionError
A new connection was arriving on a listener, but an error happened when negotiating it.
This can include, for example, an error during the handshake of the encryption layer, or the connection unexpectedly closed.
Fields of IncomingConnectionError
listen_addr: Multiaddr
Address of the listener which received the connection.
send_back_addr: Multiaddr
Address used to send back data to the remote.
error: IncomingError<TTrans::Error>
The error that happened.
Connected
A new connection to a peer has been opened.
Fields of Connected
peer_id: PeerId
Id of the peer.
endpoint: ConnectedPoint
If Listener
, then we received the connection. If Dial
, then it's a connection that
we opened.
Replaced
A connection to a peer has been replaced with a new one.
Fields of Replaced
peer_id: PeerId
Id of the peer.
closed_endpoint: ConnectedPoint
Endpoint we were connected to.
endpoint: ConnectedPoint
If Listener
, then we received the connection. If Dial
, then it's a connection that
we opened.
NodeClosed
A connection to a node has been closed.
This happens once both the inbound and outbound channels are closed, and no more outbound substream attempt is pending.
Fields of NodeClosed
NodeError
The handler of a node has produced an error.
Fields of NodeError
peer_id: PeerId
Identifier of the node.
endpoint: ConnectedPoint
Endpoint we were connected to.
error: HandledNodeError<THandlerErr>
The error that happened.
DialError
Failed to reach a peer that we were trying to dial.
Fields of DialError
remain_addrs_attempt: usize
Returns the number of multiaddresses that still need to be attempted. If this is non-zero, then there's still a chance we can connect to this node. If this is zero, then we have definitely failed.
peer_id: PeerId
Id of the peer we were trying to dial.
multiaddr: Multiaddr
The multiaddr we failed to reach.
error: RawSwarmReachError<TTrans::Error>
The error that happened.
UnknownPeerDialError
Failed to reach a peer that we were trying to dial.
Fields of UnknownPeerDialError
multiaddr: Multiaddr
The multiaddr we failed to reach.
error: TransportError<TTrans::Error>
The error that happened.
handler: THandler
The handler that was passed to dial()
.
NodeEvent
A node produced a custom event.
Fields of NodeEvent
peer_id: PeerId
Id of the node that produced the event.
event: TOutEvent
Event that was produced by the node.
Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> Debug for RawSwarmEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> where
TOutEvent: Debug,
TTrans: Transport,
TTrans::Error: Debug,
THandlerErr: Debug,
[src]
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> Debug for RawSwarmEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> where
TOutEvent: Debug,
TTrans: Transport,
TTrans::Error: Debug,
THandlerErr: Debug,
Auto Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> Send for RawSwarmEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> where
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::Listener: Send,
<TTrans as Transport>::ListenerUpgrade: Send,
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> Send for RawSwarmEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> where
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::Listener: Send,
<TTrans as Transport>::ListenerUpgrade: Send,
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> !Sync for RawSwarmEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr>
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr> !Sync for RawSwarmEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self
impl<T> Erased for T
impl<T> Erased for T