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, }, }
Expand description

Event that can happen on the ListenersStream.

Variants

NewAddress

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.

AddressExpired

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.

Incoming

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.

Closed

A listener closed.

Show fields

Fields of Closed

listener_id: ListenerId

The ID of the listener that closed.

addresses: Vec<Multiaddr, Global>

The addresses that the listener was listening on.

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.

Error

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.