pub enum SocketError {
UnsupportedAddressFamily,
Errno(i32),
ErrnoWithDescription(i32, String),
Other(String),
Unknown,
}
Expand description
An error that can occur with a socket
Variants§
UnsupportedAddressFamily
Unsupported address family
Errno(i32)
Socket error with errno
ErrnoWithDescription(i32, String)
Socket error with errno and a description
Other(String)
Other error
Unknown
Unknown error
Implementations§
Source§impl SocketError
impl SocketError
Sourcepub fn new_errno_with_description<S>(errno: i32, description: S) -> Self
pub fn new_errno_with_description<S>(errno: i32, description: S) -> Self
Create a new SocketError::ErrnoWithDescription
Trait Implementations§
Source§impl Clone for SocketError
impl Clone for SocketError
Source§fn clone(&self) -> SocketError
fn clone(&self) -> SocketError
Returns a duplicate of the value. Read more
1.0.0 · 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 SocketError
impl Debug for SocketError
Source§impl Default for SocketError
impl Default for SocketError
Source§fn default() -> SocketError
fn default() -> SocketError
Returns the “default value” for a type. Read more
Source§impl Display for SocketError
impl Display for SocketError
Source§impl Error for SocketError
impl Error for SocketError
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<SocketError> for TlsSocketError
impl From<SocketError> for TlsSocketError
Source§fn from(source: SocketError) -> Self
fn from(source: SocketError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SocketError
impl PartialEq for SocketError
impl Eq for SocketError
impl StructuralPartialEq for SocketError
Auto Trait Implementations§
impl Freeze for SocketError
impl RefUnwindSafe for SocketError
impl Send for SocketError
impl Sync for SocketError
impl Unpin for SocketError
impl UnwindSafe for SocketError
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