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 Clone for RequestResponseEvent
impl Clone for RequestResponseEvent
source§fn clone(&self) -> RequestResponseEvent
fn clone(&self) -> RequestResponseEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§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 Eq for RequestResponseEvent
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.