pub enum RequestResponseEvent<TRequest, TResponse, TChannelResponse = TResponse> {
Message {
peer: PeerId,
message: RequestResponseMessage<TRequest, TResponse, TChannelResponse>,
},
OutboundFailure {
peer: PeerId,
request_id: RequestId,
error: OutboundFailure,
},
InboundFailure {
peer: PeerId,
request_id: RequestId,
error: InboundFailure,
},
ResponseSent {
peer: PeerId,
request_id: RequestId,
},
}
Expand description
The events emitted by a RequestResponse
protocol.
Variants§
Message
Fields
§
message: RequestResponseMessage<TRequest, TResponse, TChannelResponse>
The incoming message.
An incoming message (request or response).
OutboundFailure
Fields
§
error: OutboundFailure
The error that occurred.
An outbound request failed.
InboundFailure
Fields
§
error: InboundFailure
The error that occurred.
An inbound request failed.
ResponseSent
Fields
A response to an inbound request has been sent.
When this event is received, the response has been flushed on the underlying transport connection.