pub enum RequestResponseEvent {
RequestReceived {
peer: PeerId,
fallback: Option<ProtocolName>,
request_id: RequestId,
request: Vec<u8>,
},
ResponseReceived {
peer: PeerId,
request_id: RequestId,
fallback: Option<ProtocolName>,
response: Vec<u8>,
},
RequestFailed {
peer: PeerId,
request_id: RequestId,
error: RequestResponseError,
},
}
Expand description
Request-response events.
Variants§
RequestReceived
Request received from remote
Fields
§
fallback: Option<ProtocolName>
Fallback protocol, if the substream was negotiated using a fallback.
ResponseReceived
Response received.
Fields
§
fallback: Option<ProtocolName>
Fallback protocol, if the substream was negotiated using a fallback.
RequestFailed
Request failed.
Trait Implementations§
source§impl Debug for RequestResponseEvent
impl Debug for RequestResponseEvent
source§impl PartialEq for RequestResponseEvent
impl PartialEq for RequestResponseEvent
source§fn eq(&self, other: &RequestResponseEvent) -> bool
fn eq(&self, other: &RequestResponseEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RequestResponseEvent
Auto Trait Implementations§
impl !Freeze for RequestResponseEvent
impl !RefUnwindSafe for RequestResponseEvent
impl Send for RequestResponseEvent
impl Sync for RequestResponseEvent
impl Unpin for RequestResponseEvent
impl !UnwindSafe for RequestResponseEvent
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