Enum libp2p_request_response::handler::Event
source · pub enum Event<TCodec>where
TCodec: Codec,{
Request {
request_id: RequestId,
request: TCodec::Request,
sender: Sender<TCodec::Response>,
},
Response {
request_id: RequestId,
response: TCodec::Response,
},
ResponseSent(RequestId),
ResponseOmission(RequestId),
OutboundTimeout(RequestId),
OutboundUnsupportedProtocols(RequestId),
InboundTimeout(RequestId),
InboundUnsupportedProtocols(RequestId),
}Expand description
The events emitted by the Handler.
Variants§
Request
A request has been received.
Response
A response has been received.
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.
Trait Implementations§
Auto Trait Implementations§
impl<TCodec> !RefUnwindSafe for Event<TCodec>
impl<TCodec> Send for Event<TCodec>
impl<TCodec> Sync for Event<TCodec>where <TCodec as Codec>::Request: Sync, <TCodec as Codec>::Response: Sync,
impl<TCodec> Unpin for Event<TCodec>where <TCodec as Codec>::Request: Unpin, <TCodec as Codec>::Response: Unpin,
impl<TCodec> !UnwindSafe for Event<TCodec>
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