pub enum TransportError {
Io(String),
Timeout,
Internal(String),
}Expand description
Coarse shape of a callback-transport failure.
A real callback transport (HTTP, IPC, in-process bridge) surfaces errors at varying granularity. The mapper consumes this enum so the trait is portable across transports and so the retry-class derivation has a stable input vocabulary.
Variants§
Io(String)
Network or pipe-level failure: connection refused, broken pipe, peer reset.
Timeout
The remote did not respond within the configured deadline.
Internal(String)
A non-IO crash inside the transport itself (serialization
panic, internal bug). Distinct from Io because the retry
class differs (InternalError -> RetryAfterReread).
Trait Implementations§
Source§impl Clone for TransportError
impl Clone for TransportError
Source§fn clone(&self) -> TransportError
fn clone(&self) -> TransportError
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 moreSource§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
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()
Source§impl From<&TransportError> for FailureClass
impl From<&TransportError> for FailureClass
Source§fn from(err: &TransportError) -> Self
fn from(err: &TransportError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TransportError
impl PartialEq for TransportError
Source§fn eq(&self, other: &TransportError) -> bool
fn eq(&self, other: &TransportError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TransportError
impl StructuralPartialEq for TransportError
Auto Trait Implementations§
impl Freeze for TransportError
impl RefUnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin for TransportError
impl UnwindSafe for TransportError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.