Enum libp2p_request_response::Event
source · pub enum Event<TRequest, TResponse, TChannelResponse = TResponse> {
Message {
peer: PeerId,
message: Message<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 request-response Behaviour
.
Variants§
Message
Fields
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.
Trait Implementations§
Auto Trait Implementations§
impl<TRequest, TResponse, TChannelResponse = TResponse> !RefUnwindSafe for Event<TRequest, TResponse, TChannelResponse>
impl<TRequest, TResponse, TChannelResponse> Send for Event<TRequest, TResponse, TChannelResponse>where TChannelResponse: Send, TRequest: Send, TResponse: Send,
impl<TRequest, TResponse, TChannelResponse> Sync for Event<TRequest, TResponse, TChannelResponse>where TChannelResponse: Send, TRequest: Sync, TResponse: Sync,
impl<TRequest, TResponse, TChannelResponse> Unpin for Event<TRequest, TResponse, TChannelResponse>where TRequest: Unpin, TResponse: Unpin,
impl<TRequest, TResponse, TChannelResponse = TResponse> !UnwindSafe for Event<TRequest, TResponse, TChannelResponse>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more