pub struct TransportFailure<E> { /* private fields */ }Expand description
Payload-redacting transport failure with an explicit delivery phase.
Unknown send state must use Self::unknown, which conservatively maps to
DeliveryPhase::PossiblySent.
Implementations§
Source§impl<E> TransportFailure<E>
impl<E> TransportFailure<E>
Sourcepub const fn not_sent(error: E) -> Self
pub const fn not_sent(error: E) -> Self
Records a failure proven to have happened before request delivery.
Sourcepub const fn possibly_sent(error: E) -> Self
pub const fn possibly_sent(error: E) -> Self
Records a failure after request delivery may have begun.
Sourcepub const fn response_started(error: E) -> Self
pub const fn response_started(error: E) -> Self
Records a failure after any response head was observed.
Sourcepub const fn unknown(error: E) -> Self
pub const fn unknown(error: E) -> Self
Conservatively records an error whose delivery state is unknown.
Sourcepub const fn phase(&self) -> DeliveryPhase
pub const fn phase(&self) -> DeliveryPhase
Returns the conservative delivery phase.
Sourcepub fn into_error(self) -> E
pub fn into_error(self) -> E
Consumes the failure and returns its adapter error.
Trait Implementations§
Source§impl<E: Clone> Clone for TransportFailure<E>
impl<E: Clone> Clone for TransportFailure<E>
Source§fn clone(&self) -> TransportFailure<E>
fn clone(&self) -> TransportFailure<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<E: Copy> Copy for TransportFailure<E>
Source§impl<E> Debug for TransportFailure<E>
impl<E> Debug for TransportFailure<E>
Source§impl<E> Display for TransportFailure<E>
impl<E> Display for TransportFailure<E>
impl<E: Eq> Eq for TransportFailure<E>
Source§impl<E> Error for TransportFailure<E>
impl<E> Error for TransportFailure<E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<E> Freeze for TransportFailure<E>where
E: Freeze,
impl<E> RefUnwindSafe for TransportFailure<E>where
E: RefUnwindSafe,
impl<E> Send for TransportFailure<E>where
E: Send,
impl<E> Sync for TransportFailure<E>where
E: Sync,
impl<E> Unpin for TransportFailure<E>where
E: Unpin,
impl<E> UnsafeUnpin for TransportFailure<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for TransportFailure<E>where
E: UnwindSafe,
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