pub enum TransportError {
NotConnected,
AddressInvalid(SmolStr),
ConnectFailed(SmolStr),
Io(SmolStr),
Timeout,
Tls(SmolStr),
SerialFraming(SmolStr),
Closed,
}Expand description
Errors raised by transports (connect / read / write / close).
Variants§
NotConnected
Underlying socket / serial port not connected.
AddressInvalid(SmolStr)
Address parse / DNS resolution failure. Carries a human-readable
reason; we do not embed std::io::Error here so the type stays
Eq + Clone + no_std.
ConnectFailed(SmolStr)
Failed during connect.
Io(SmolStr)
I/O failure — generic. The protocol layer maps this to
IotError::Transport.
Timeout
Operation timed out.
Tls(SmolStr)
TLS / DTLS handshake failure.
SerialFraming(SmolStr)
Serial-port specific: framing / parity error.
Closed
Peer closed the connection unexpectedly.
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
impl Eq 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 IotError
impl From<TransportError> for IotError
Source§fn from(e: TransportError) -> Self
fn from(e: TransportError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TransportError
impl PartialEq 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