Enum libp2p_relay::v2::relay::Event

source ·
pub enum Event {
    ReservationReqAccepted {
        src_peer_id: PeerId,
        renewed: bool,
    },
    ReservationReqAcceptFailed {
        src_peer_id: PeerId,
        error: UpgradeError,
    },
    ReservationReqDenied {
        src_peer_id: PeerId,
    },
    ReservationReqDenyFailed {
        src_peer_id: PeerId,
        error: UpgradeError,
    },
    ReservationTimedOut {
        src_peer_id: PeerId,
    },
    CircuitReqReceiveFailed {
        src_peer_id: PeerId,
        error: ConnectionHandlerUpgrErr<Void>,
    },
    CircuitReqDenied {
        src_peer_id: PeerId,
        dst_peer_id: PeerId,
    },
    CircuitReqDenyFailed {
        src_peer_id: PeerId,
        dst_peer_id: PeerId,
        error: UpgradeError,
    },
    CircuitReqAccepted {
        src_peer_id: PeerId,
        dst_peer_id: PeerId,
    },
    CircuitReqOutboundConnectFailed {
        src_peer_id: PeerId,
        dst_peer_id: PeerId,
        error: ConnectionHandlerUpgrErr<CircuitFailedReason>,
    },
    CircuitReqAcceptFailed {
        src_peer_id: PeerId,
        dst_peer_id: PeerId,
        error: UpgradeError,
    },
    CircuitClosed {
        src_peer_id: PeerId,
        dst_peer_id: PeerId,
        error: Option<Error>,
    },
}
Expand description

The events produced by the Relay behaviour.

Variants§

§

ReservationReqAccepted

Fields

§src_peer_id: PeerId
§renewed: bool

Indicates whether the request replaces an existing reservation.

An inbound reservation request has been accepted.

§

ReservationReqAcceptFailed

Fields

§src_peer_id: PeerId
§error: UpgradeError

Accepting an inbound reservation request failed.

§

ReservationReqDenied

Fields

§src_peer_id: PeerId

An inbound reservation request has been denied.

§

ReservationReqDenyFailed

Fields

§src_peer_id: PeerId
§error: UpgradeError

Denying an inbound reservation request has failed.

§

ReservationTimedOut

Fields

§src_peer_id: PeerId

An inbound reservation has timed out.

§

CircuitReqReceiveFailed

Fields

§src_peer_id: PeerId
§

CircuitReqDenied

Fields

§src_peer_id: PeerId
§dst_peer_id: PeerId

An inbound circuit request has been denied.

§

CircuitReqDenyFailed

Fields

§src_peer_id: PeerId
§dst_peer_id: PeerId
§error: UpgradeError

Denying an inbound circuit request failed.

§

CircuitReqAccepted

Fields

§src_peer_id: PeerId
§dst_peer_id: PeerId

An inbound cirucit request has been accepted.

§

CircuitReqOutboundConnectFailed

Fields

§src_peer_id: PeerId
§dst_peer_id: PeerId
§error: ConnectionHandlerUpgrErr<CircuitFailedReason>

An outbound connect for an inbound cirucit request failed.

§

CircuitReqAcceptFailed

Fields

§src_peer_id: PeerId
§dst_peer_id: PeerId
§error: UpgradeError

Accepting an inbound circuit request failed.

§

CircuitClosed

Fields

§src_peer_id: PeerId
§dst_peer_id: PeerId
§error: Option<Error>

An inbound circuit has closed.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.