Type Alias libp2p_request_response::RequestResponseMessage

source ·
pub type RequestResponseMessage<TRequest, TResponse, TChannelResponse> = Message<TRequest, TResponse, TChannelResponse>;
👎Deprecated since 0.24.0: Use re-exports that omit RequestResponse prefix, i.e. libp2p::request_response::Message

Aliased Type§

enum RequestResponseMessage<TRequest, TResponse, TChannelResponse> {
    Request {
        request_id: RequestId,
        request: TRequest,
        channel: ResponseChannel<TChannelResponse>,
    },
    Response {
        request_id: RequestId,
        response: TResponse,
    },
}

Variants§

§

Request

A request message.

Fields

§request_id: RequestId

The ID of this request.

§request: TRequest

The request message.

§channel: ResponseChannel<TChannelResponse>

The channel waiting for the response.

If this channel is dropped instead of being used to send a response via Behaviour::send_response, a Event::InboundFailure with InboundFailure::ResponseOmission is emitted.

§

Response

A response message.

Fields

§request_id: RequestId

The ID of the request that produced this response.

See Behaviour::send_request.

§response: TResponse

The response message.