#[repr(transparent)]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
Implementations§
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 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 PROCUNAVAIL: Self = _
pub const PROCUNAVAIL: Self = _
EPROCUNAVAIL
sourcepub const PROGMISMATCH: Self = _
pub const PROGMISMATCH: Self = _
EPROGMISMATCH
sourcepub const PROGUNAVAIL: Self = _
pub const PROGUNAVAIL: Self = _
EPROGUNAVAIL
sourcepub const PROTONOSUPPORT: Self = _
pub const PROTONOSUPPORT: Self = _
EPROTONOSUPPORT
sourcepub const RPCMISMATCH: Self = _
pub const RPCMISMATCH: Self = _
ERPCMISMATCH
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
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.
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)>
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<Errno> for Errno
impl PartialEq<Errno> for Errno
impl Copy for Errno
impl Eq for Errno
impl StructuralEq for Errno
impl StructuralPartialEq for Errno
Auto Trait Implementations§
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