pub enum TransportError {
NotImplemented(String),
ConnectFailed(String),
ListenFailed(String),
HandshakeFailed(String),
VersionMismatch {
local: u32,
remote: u32,
},
ConnectionClosed(String),
Timeout(String),
HeartbeatTimeout(Duration),
WebSocket(String),
Io(Error),
Serialize(String),
Network(NetworkError),
}Expand description
Errors from Layer 4 transport operations.
Variants§
NotImplemented(String)
The requested transport or feature is not implemented.
ConnectFailed(String)
Failed to connect to the peer.
ListenFailed(String)
Failed to start listening.
HandshakeFailed(String)
The transport-level handshake failed.
VersionMismatch
Protocol version mismatch between peers.
ConnectionClosed(String)
The connection was closed unexpectedly.
Timeout(String)
A send or receive operation timed out.
HeartbeatTimeout(Duration)
Heartbeat (ping/pong) failure — the peer stopped responding.
WebSocket(String)
WebSocket protocol error.
Io(Error)
I/O error from the underlying stream.
Serialize(String)
Serialization/deserialization error (e.g., handshake JSON).
Network(NetworkError)
Error from Layer 3 (network).
Trait Implementations§
Source§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
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<Error> for TransportError
impl From<Error> for TransportError
Source§impl From<NetworkError> for TransportError
impl From<NetworkError> for TransportError
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for NodeError
impl From<TransportError> for NodeError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for SessionError
impl From<TransportError> for SessionError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
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