#[repr(transparent)]pub struct Errno(u16);
Expand description
Tuple Fields§
§0: u16
Implementations§
source§impl Errno
impl Errno
sourcepub fn from_io_error(io_err: &Error) -> Option<Self>
pub fn from_io_error(io_err: &Error) -> Option<Self>
Extract an Errno
value from a std::io::Error
.
This isn’t a From
conversion because it’s expected to be relatively
uncommon.
sourcepub const fn raw_os_error(self) -> i32
pub const fn raw_os_error(self) -> i32
Extract the raw OS error number from this error.
sourcepub const fn from_raw_os_error(raw: i32) -> Self
pub const fn from_raw_os_error(raw: i32) -> Self
Construct an Errno
from a raw OS error number.
sourceconst fn from_errno(raw: u32) -> Self
const fn from_errno(raw: u32) -> Self
Convert from a C errno
value (which is positive) to an Errno
.
source§impl Errno
impl Errno
sourcepub const ADDRNOTAVAIL: Self = _
pub const ADDRNOTAVAIL: Self = _
EADDRNOTAVAIL
sourcepub const AFNOSUPPORT: Self = _
pub const AFNOSUPPORT: Self = _
EAFNOSUPPORT
sourcepub const CONNABORTED: Self = _
pub const CONNABORTED: Self = _
ECONNABORTED
sourcepub const CONNREFUSED: Self = _
pub const CONNREFUSED: Self = _
ECONNREFUSED
sourcepub const DESTADDRREQ: Self = _
pub const DESTADDRREQ: Self = _
EDESTADDRREQ
sourcepub const HOSTUNREACH: Self = _
pub const HOSTUNREACH: Self = _
EHOSTUNREACH
sourcepub const INPROGRESS: Self = _
pub const INPROGRESS: Self = _
EINPROGRESS
sourcepub const INTR: Self = _
pub const INTR: Self = _
EINTR
.
For a convenient way to retry system calls that exit with INTR
, use
retry_on_intr
.
sourcepub const KEYEXPIRED: Self = _
pub const KEYEXPIRED: Self = _
EKEYEXPIRED
sourcepub const KEYREJECTED: Self = _
pub const KEYREJECTED: Self = _
EKEYREJECTED
sourcepub const KEYREVOKED: Self = _
pub const KEYREVOKED: Self = _
EKEYREVOKED
sourcepub const MEDIUMTYPE: Self = _
pub const MEDIUMTYPE: Self = _
EMEDIUMTYPE
sourcepub const NAMETOOLONG: Self = _
pub const NAMETOOLONG: Self = _
ENAMETOOLONG
sourcepub const NETUNREACH: Self = _
pub const NETUNREACH: Self = _
ENETUNREACH
sourcepub const NOPROTOOPT: Self = _
pub const NOPROTOOPT: Self = _
ENOPROTOOPT
sourcepub const NOTRECOVERABLE: Self = _
pub const NOTRECOVERABLE: Self = _
ENOTRECOVERABLE
sourcepub const PFNOSUPPORT: Self = _
pub const PFNOSUPPORT: Self = _
EPFNOSUPPORT
sourcepub const PROTONOSUPPORT: Self = _
pub const PROTONOSUPPORT: Self = _
EPROTONOSUPPORT
sourcepub const SOCKTNOSUPPORT: Self = _
pub const SOCKTNOSUPPORT: Self = _
ESOCKTNOSUPPORT
sourcepub const TOOMANYREFS: Self = _
pub const TOOMANYREFS: Self = _
ETOOMANYREFS
sourcepub const WOULDBLOCK: Self = _
pub const WOULDBLOCK: Self = _
EWOULDBLOCK
Trait Implementations§
source§impl Error for Errno
impl Error for Errno
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()
impl Copy for Errno
impl Eq for Errno
impl StructuralPartialEq for Errno
Auto Trait Implementations§
impl Freeze for Errno
impl RefUnwindSafe for Errno
impl Send for Errno
impl Sync for Errno
impl Unpin for Errno
impl UnwindSafe for Errno
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)