Enum litep2p::protocol::request_response::RejectReason
source · pub enum RejectReason {
SubstreamOpenError(SubstreamError),
ConnectionClosed,
SubstreamClosed,
DialFailed(Option<ImmediateDialError>),
}
Expand description
The reason why a request was rejected.
Variants§
SubstreamOpenError(SubstreamError)
Substream error.
ConnectionClosed
The peer disconnected before the request was processed.
SubstreamClosed
The substream was closed before the request was processed.
DialFailed(Option<ImmediateDialError>)
The dial failed.
If the dial failure is immediate, the error is included.
If the dialing process is happening in parallel on multiple addresses (potentially with multiple protocols), the dialing process is not considered immediate and the given errors are not propagated for simplicity.
Trait Implementations§
source§impl Debug for RejectReason
impl Debug for RejectReason
source§impl From<SubstreamError> for RejectReason
impl From<SubstreamError> for RejectReason
source§fn from(error: SubstreamError) -> Self
fn from(error: SubstreamError) -> Self
Converts to this type from the input type.
source§impl PartialEq for RejectReason
impl PartialEq for RejectReason
source§fn eq(&self, other: &RejectReason) -> bool
fn eq(&self, other: &RejectReason) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RejectReason
Auto Trait Implementations§
impl !Freeze for RejectReason
impl !RefUnwindSafe for RejectReason
impl Send for RejectReason
impl Sync for RejectReason
impl Unpin for RejectReason
impl !UnwindSafe for RejectReason
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