#[repr(transparent)]pub struct Errno(_);
Expand description
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
sourceimpl 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.
sourceimpl 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
sourceimpl Error for Errno
impl Error for Errno
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more