#[non_exhaustive]pub enum TransportError {
AddressInUse,
Unsupported,
Io(IoErrorKind),
}Expand description
Errors returned by TransportSocket and TransportFactory
operations.
#[non_exhaustive] so that backend-specific conditions can be added in
future releases without a breaking change. Implementations map their
native error types into one of these variants; anything that does not
fit a specific variant should use TransportError::Io with an
appropriate IoErrorKind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AddressInUse
Bind failed because the address or port is already in use.
Unsupported
The operation is not supported by this transport (for example, multicast on a backend that has none, or an IPv6 address on an IPv4-only stack).
Io(IoErrorKind)
A generic I/O error, classified by a portable IoErrorKind.
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 moreimpl Copy for TransportError
Source§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 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