Enum libp2p::request_response::InboundFailure
source · [−]pub enum InboundFailure {
Timeout,
ConnectionClosed,
UnsupportedProtocols,
ResponseOmission,
}
Expand description
Possible failures occurring in the context of receiving an inbound request and sending a response.
Variants
Timeout
The inbound request timed out, either while reading the
incoming request or before a response is sent, e.g. if
RequestResponse::send_response
is not called in a
timely manner.
ConnectionClosed
The connection closed before a response could be send.
UnsupportedProtocols
The local peer supports none of the protocols requested by the remote.
ResponseOmission
The local peer failed to respond to an inbound request
due to the ResponseChannel
being dropped instead of
being passed to RequestResponse::send_response
.
Trait Implementations
sourceimpl Clone for InboundFailure
impl Clone for InboundFailure
sourcepub fn clone(&self) -> InboundFailure
pub fn clone(&self) -> InboundFailure
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for InboundFailure
impl Send for InboundFailure
impl Sync for InboundFailure
impl Unpin for InboundFailure
impl UnwindSafe for InboundFailure
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more