[−][src]Enum libp2p::core::nodes::network::NetworkEvent
Event that can happen on the Network
.
Variants
One of the listeners gracefully closed.
Fields of ListenerClosed
listener_id: ListenerId
The listener ID that closed.
reason: Result<(), <TTrans as Transport>::Error>
Reason for the closure. Contains Ok(())
if the stream produced None
, or Err
if the stream produced an error.
One of the listeners reported a non-fatal errored.
Fields of ListenerError
listener_id: ListenerId
The listener that errored.
error: <TTrans as Transport>::Error
The listener error.
One of the listeners is now listening on an additional address.
Fields of NewListenerAddress
listener_id: ListenerId
The listener that is listening on the new address.
listen_addr: Multiaddr
The new address the listener is now also listening on.
One of the listeners is no longer listening on some address.
Fields of ExpiredListenerAddress
listener_id: ListenerId
The listener that is no longer listening on some address.
listen_addr: Multiaddr
The expired address.
IncomingConnection(IncomingConnectionEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>)
A new connection arrived on a listener.
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
local_addr: Multiaddr
Local connection address.
send_back_addr: Multiaddr
Address used to send back data to the remote.
error: IncomingError<<TTrans as Transport>::Error>
The error that happened.
A new connection to a peer has been opened.
Fields of Connected
conn_info: TConnInfo
Information about the connection, including the peer ID.
endpoint: ConnectedPoint
If Listener
, then we received the connection. If Dial
, then it's a connection that
we opened.
A connection to a peer has been replaced with a new one.
Fields of Replaced
new_info: TConnInfo
Information about the new connection. The TPeerId
is the same as the one as the one
in old_info
.
old_info: TConnInfo
Information about the old connection. The TPeerId
is the same as the one as the one
in new_info
.
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.
The handler of a node has produced an error.
Fields of NodeClosed
conn_info: TConnInfo
Information about the connection that has been closed.
endpoint: ConnectedPoint
Endpoint we were connected to.
error: HandledNodeError<THandlerErr>
The error that happened.
Failed to reach a peer that we were trying to dial.
Fields of DialError
new_state: PeerState
New state of a peer.
peer_id: TPeerId
Id of the peer we were trying to dial.
multiaddr: Multiaddr
The multiaddr we failed to reach.
error: NetworkReachError<<TTrans as Transport>::Error, TConnInfo>
The error that happened.
Failed to reach a peer that we were trying to dial.
Fields of UnknownPeerDialError
multiaddr: Multiaddr
The multiaddr we failed to reach.
error: UnknownPeerDialErr<<TTrans as Transport>::Error>
The error that happened.
handler: THandler
The handler that was passed to dial()
.
A node produced a custom event.
Fields of NodeEvent
Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> Debug for NetworkEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Debug,
THandlerErr: Debug,
TOutEvent: Debug,
TPeerId: Debug,
TTrans: Transport,
<TTrans as Transport>::Error: Debug,
[src]
TConnInfo: Debug,
THandlerErr: Debug,
TOutEvent: Debug,
TPeerId: Debug,
TTrans: Transport,
<TTrans as Transport>::Error: Debug,
Auto Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo = PeerId, TPeerId = PeerId> !RefUnwindSafe for NetworkEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> Send for NetworkEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::ListenerUpgrade: Send,
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::ListenerUpgrade: Send,
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo = PeerId, TPeerId = PeerId> !Sync for NetworkEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> Unpin for NetworkEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Unpin,
THandler: Unpin,
THandlerErr: Unpin,
TOutEvent: Unpin,
TPeerId: Unpin,
<TTrans as Transport>::Error: Unpin,
<TTrans as Transport>::ListenerUpgrade: Unpin,
TConnInfo: Unpin,
THandler: Unpin,
THandlerErr: Unpin,
TOutEvent: Unpin,
TPeerId: Unpin,
<TTrans as Transport>::Error: Unpin,
<TTrans as Transport>::ListenerUpgrade: Unpin,
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo = PeerId, TPeerId = PeerId> !UnwindSafe for NetworkEvent<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,