Enum libp2p::request_response::RequestResponseEvent [−][src]
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,
},
}The events emitted by a RequestResponse protocol.
Variants
An incoming message (request or response).
Show fields
Fields of Message
peer: PeerIdThe peer who sent the message.
message: RequestResponseMessage<TRequest, TResponse, TChannelResponse>The incoming message.
An outbound request failed.
Show fields
Fields of OutboundFailure
peer: PeerIdThe peer to whom the request was sent.
request_id: RequestIdThe (local) ID of the failed request.
error: OutboundFailureThe error that occurred.
An inbound request failed.
Show fields
Fields of InboundFailure
peer: PeerIdThe peer from whom the request was received.
request_id: RequestIdThe ID of the failed inbound request.
error: InboundFailureThe error that occurred.
A response to an inbound request has been sent.
When this event is received, the response has been flushed on the underlying transport connection.
Show fields
Trait Implementations
Auto Trait Implementations
impl<TRequest, TResponse, TChannelResponse = TResponse> !RefUnwindSafe for RequestResponseEvent<TRequest, TResponse, TChannelResponse>
impl<TRequest, TResponse, TChannelResponse> Send for RequestResponseEvent<TRequest, TResponse, TChannelResponse> where
TChannelResponse: Send,
TRequest: Send,
TResponse: Send,
TChannelResponse: Send,
TRequest: Send,
TResponse: Send,
impl<TRequest, TResponse, TChannelResponse> Sync for RequestResponseEvent<TRequest, TResponse, TChannelResponse> where
TChannelResponse: Send,
TRequest: Sync,
TResponse: Sync,
TChannelResponse: Send,
TRequest: Sync,
TResponse: Sync,
impl<TRequest, TResponse, TChannelResponse> Unpin for RequestResponseEvent<TRequest, TResponse, TChannelResponse> where
TRequest: Unpin,
TResponse: Unpin,
TRequest: Unpin,
TResponse: Unpin,