Enum libp2p::core::connection::ListenersEvent [−][src]
pub enum ListenersEvent<TTrans> where
TTrans: Transport, { NewAddress { listener_id: ListenerId, listen_addr: Multiaddr, }, AddressExpired { listener_id: ListenerId, listen_addr: Multiaddr, }, Incoming { listener_id: ListenerId, upgrade: <TTrans as Transport>::ListenerUpgrade, local_addr: Multiaddr, send_back_addr: Multiaddr, }, Closed { listener_id: ListenerId, addresses: Vec<Multiaddr, Global>, reason: Result<(), <TTrans as Transport>::Error>, }, Error { listener_id: ListenerId, error: <TTrans as Transport>::Error, }, }
Event that can happen on the ListenersStream
.
Variants
A new address is being listened on.
Show fields
Fields of NewAddress
listener_id: ListenerId
The listener that is listening on the new address.
listen_addr: Multiaddr
The new address that is being listened on.
An address is no longer being listened on.
Show fields
Fields of AddressExpired
listener_id: ListenerId
The listener that is no longer listening on the address.
listen_addr: Multiaddr
The new address that is being listened on.
A connection is incoming on one of the listeners.
Show fields
Fields of Incoming
listener_id: ListenerId
The listener that produced the upgrade.
upgrade: <TTrans as Transport>::ListenerUpgrade
The produced upgrade.
local_addr: Multiaddr
Local connection address.
send_back_addr: Multiaddr
Address used to send back data to the incoming client.
A listener closed.
Show fields
Fields of Closed
A listener errored.
The listener will continue to be polled for new events and the event is for informational purposes only.
Show fields
Fields of Error
listener_id: ListenerId
The ID of the listener that errored.
error: <TTrans as Transport>::Error
The error value.
Trait Implementations
Auto Trait Implementations
impl<TTrans> RefUnwindSafe for ListenersEvent<TTrans> where
<TTrans as Transport>::Error: RefUnwindSafe,
<TTrans as Transport>::ListenerUpgrade: RefUnwindSafe,
<TTrans as Transport>::Error: RefUnwindSafe,
<TTrans as Transport>::ListenerUpgrade: RefUnwindSafe,
impl<TTrans> Send for ListenersEvent<TTrans> where
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::ListenerUpgrade: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::ListenerUpgrade: Send,
impl<TTrans> Sync for ListenersEvent<TTrans> where
<TTrans as Transport>::Error: Sync,
<TTrans as Transport>::ListenerUpgrade: Sync,
<TTrans as Transport>::Error: Sync,
<TTrans as Transport>::ListenerUpgrade: Sync,
impl<TTrans> Unpin for ListenersEvent<TTrans> where
<TTrans as Transport>::Error: Unpin,
<TTrans as Transport>::ListenerUpgrade: Unpin,
<TTrans as Transport>::Error: Unpin,
<TTrans as Transport>::ListenerUpgrade: Unpin,
impl<TTrans> UnwindSafe for ListenersEvent<TTrans> where
<TTrans as Transport>::Error: UnwindSafe,
<TTrans as Transport>::ListenerUpgrade: UnwindSafe,
<TTrans as Transport>::Error: UnwindSafe,
<TTrans as Transport>::ListenerUpgrade: UnwindSafe,