pub struct Errno(/* private fields */);Expand description
errno—An error code.
The error type for rustix APIs. This is similar to std::io::Error,
but only holds an OS error code, and no extra error value.
§References
The error type for rustix APIs.
This is similar to std::io::Error, but only holds an OS error code,
and no extra error value.
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.
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