pub enum ConnectionError<TransportError> {
Transport(TransportError),
UnexpectedEof,
WriteZero,
Timeout,
SequenceExhausted,
Failed,
}Expand description
A terminal failure of a Reliable connection.
Corrupt or malformed frames never produce an error; they are discarded and recovered by retransmission. Once any of these occurs, the connection is permanently failed.
Variants§
Transport(TransportError)
The underlying transport returned an error.
UnexpectedEof
The underlying transport reported end of stream.
WriteZero
The underlying transport accepted zero bytes of a nonempty write.
Timeout
A packet went unacknowledged after the configured number of retransmissions.
SequenceExhausted
All 2^32 sequence numbers of this session have been used.
Start a new session with a fresh identifier.
Failed
The connection failed earlier and the original error was already reported.
Trait Implementations§
Source§impl<TransportError: Clone> Clone for ConnectionError<TransportError>
impl<TransportError: Clone> Clone for ConnectionError<TransportError>
impl<TransportError: Copy> Copy for ConnectionError<TransportError>
Source§impl<TransportError: Debug> Debug for ConnectionError<TransportError>
impl<TransportError: Debug> Debug for ConnectionError<TransportError>
Source§impl<'de, TransportError> Deserialize<'de> for ConnectionError<TransportError>where
TransportError: Deserialize<'de>,
impl<'de, TransportError> Deserialize<'de> for ConnectionError<TransportError>where
TransportError: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E: Display> Display for ConnectionError<E>
impl<E: Display> Display for ConnectionError<E>
impl<TransportError: Eq> Eq for ConnectionError<TransportError>
Source§impl<E: Error> Error for ConnectionError<E>
impl<E: Error> Error for ConnectionError<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()
Source§impl<TransportError> Format for ConnectionError<TransportError>where
TransportError: Format,
impl<TransportError> Format for ConnectionError<TransportError>where
TransportError: Format,
Source§impl<TransportError: Hash> Hash for ConnectionError<TransportError>
impl<TransportError: Hash> Hash for ConnectionError<TransportError>
Source§impl<TransportError: PartialEq> PartialEq for ConnectionError<TransportError>
impl<TransportError: PartialEq> PartialEq for ConnectionError<TransportError>
Source§impl<TransportError> Serialize for ConnectionError<TransportError>where
TransportError: Serialize,
impl<TransportError> Serialize for ConnectionError<TransportError>where
TransportError: Serialize,
impl<TransportError: PartialEq> StructuralPartialEq for ConnectionError<TransportError>
Auto Trait Implementations§
impl<TransportError> Freeze for ConnectionError<TransportError>where
TransportError: Freeze,
impl<TransportError> RefUnwindSafe for ConnectionError<TransportError>where
TransportError: RefUnwindSafe,
impl<TransportError> Send for ConnectionError<TransportError>where
TransportError: Send,
impl<TransportError> Sync for ConnectionError<TransportError>where
TransportError: Sync,
impl<TransportError> Unpin for ConnectionError<TransportError>where
TransportError: Unpin,
impl<TransportError> UnsafeUnpin for ConnectionError<TransportError>where
TransportError: UnsafeUnpin,
impl<TransportError> UnwindSafe for ConnectionError<TransportError>where
TransportError: 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