Type Alias libp2p_request_response::HandlerEvent

source ยท
pub type HandlerEvent<TCodec> = Event<TCodec>;
๐Ÿ‘ŽDeprecated since 0.24.0: Use re-exports that omit RequestResponse prefix, i.e. libp2p::request_response::handler::Event

Aliased Typeยง

enum HandlerEvent<TCodec> {
    Request {
        request_id: RequestId,
        request: <TCodec as Codec>::Request,
        sender: Sender<<TCodec as Codec>::Response>,
    },
    Response {
        request_id: RequestId,
        response: <TCodec as Codec>::Response,
    },
    ResponseSent(RequestId),
    ResponseOmission(RequestId),
    OutboundTimeout(RequestId),
    OutboundUnsupportedProtocols(RequestId),
    InboundTimeout(RequestId),
    InboundUnsupportedProtocols(RequestId),
}

Variantsยง

ยง

Request

A request has been received.

Fields

ยงrequest_id: RequestId
ยงrequest: <TCodec as Codec>::Request
ยงsender: Sender<<TCodec as Codec>::Response>
ยง

Response

A response has been received.

Fields

ยงrequest_id: RequestId
ยงresponse: <TCodec as Codec>::Response
ยง

ResponseSent(RequestId)

A response to an inbound request has been sent.

ยง

ResponseOmission(RequestId)

A response to an inbound request was omitted as a result of dropping the response sender of an inbound Request.

ยง

OutboundTimeout(RequestId)

An outbound request timed out while sending the request or waiting for the response.

ยง

OutboundUnsupportedProtocols(RequestId)

An outbound request failed to negotiate a mutually supported protocol.

ยง

InboundTimeout(RequestId)

An inbound request timed out while waiting for the request or sending the response.

ยง

InboundUnsupportedProtocols(RequestId)

An inbound request failed to negotiate a mutually supported protocol.