Struct rustix_uring::types::Errno
source · 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§
source§impl Errno
impl Errno
sourcepub fn from_io_error(io_err: &Error) -> Option<Errno>
pub fn from_io_error(io_err: &Error) -> Option<Errno>
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) -> Errno
pub const fn from_raw_os_error(raw: i32) -> Errno
Construct an Errno
from a raw OS error number.
source§impl Errno
impl Errno
sourcepub const ADDRNOTAVAIL: Errno = Self::from_errno(errno::EADDRNOTAVAIL)
pub const ADDRNOTAVAIL: Errno = Self::from_errno(errno::EADDRNOTAVAIL)
EADDRNOTAVAIL
sourcepub const AFNOSUPPORT: Errno = Self::from_errno(errno::EAFNOSUPPORT)
pub const AFNOSUPPORT: Errno = Self::from_errno(errno::EAFNOSUPPORT)
EAFNOSUPPORT
sourcepub const CONNABORTED: Errno = Self::from_errno(errno::ECONNABORTED)
pub const CONNABORTED: Errno = Self::from_errno(errno::ECONNABORTED)
ECONNABORTED
sourcepub const CONNREFUSED: Errno = Self::from_errno(errno::ECONNREFUSED)
pub const CONNREFUSED: Errno = Self::from_errno(errno::ECONNREFUSED)
ECONNREFUSED
sourcepub const DESTADDRREQ: Errno = Self::from_errno(errno::EDESTADDRREQ)
pub const DESTADDRREQ: Errno = Self::from_errno(errno::EDESTADDRREQ)
EDESTADDRREQ
sourcepub const HOSTUNREACH: Errno = Self::from_errno(errno::EHOSTUNREACH)
pub const HOSTUNREACH: Errno = Self::from_errno(errno::EHOSTUNREACH)
EHOSTUNREACH
sourcepub const INPROGRESS: Errno = Self::from_errno(errno::EINPROGRESS)
pub const INPROGRESS: Errno = Self::from_errno(errno::EINPROGRESS)
EINPROGRESS
sourcepub const INTR: Errno = Self::from_errno(errno::EINTR)
pub const INTR: Errno = Self::from_errno(errno::EINTR)
EINTR
.
For a convenient way to retry system calls that exit with INTR
, use
retry_on_intr
.
sourcepub const KEYEXPIRED: Errno = Self::from_errno(errno::EKEYEXPIRED)
pub const KEYEXPIRED: Errno = Self::from_errno(errno::EKEYEXPIRED)
EKEYEXPIRED
sourcepub const KEYREJECTED: Errno = Self::from_errno(errno::EKEYREJECTED)
pub const KEYREJECTED: Errno = Self::from_errno(errno::EKEYREJECTED)
EKEYREJECTED
sourcepub const KEYREVOKED: Errno = Self::from_errno(errno::EKEYREVOKED)
pub const KEYREVOKED: Errno = Self::from_errno(errno::EKEYREVOKED)
EKEYREVOKED
sourcepub const MEDIUMTYPE: Errno = Self::from_errno(errno::EMEDIUMTYPE)
pub const MEDIUMTYPE: Errno = Self::from_errno(errno::EMEDIUMTYPE)
EMEDIUMTYPE
sourcepub const NAMETOOLONG: Errno = Self::from_errno(errno::ENAMETOOLONG)
pub const NAMETOOLONG: Errno = Self::from_errno(errno::ENAMETOOLONG)
ENAMETOOLONG
sourcepub const NETUNREACH: Errno = Self::from_errno(errno::ENETUNREACH)
pub const NETUNREACH: Errno = Self::from_errno(errno::ENETUNREACH)
ENETUNREACH
sourcepub const NOPROTOOPT: Errno = Self::from_errno(errno::ENOPROTOOPT)
pub const NOPROTOOPT: Errno = Self::from_errno(errno::ENOPROTOOPT)
ENOPROTOOPT
sourcepub const NOTRECOVERABLE: Errno = Self::from_errno(errno::ENOTRECOVERABLE)
pub const NOTRECOVERABLE: Errno = Self::from_errno(errno::ENOTRECOVERABLE)
ENOTRECOVERABLE
sourcepub const PFNOSUPPORT: Errno = Self::from_errno(errno::EPFNOSUPPORT)
pub const PFNOSUPPORT: Errno = Self::from_errno(errno::EPFNOSUPPORT)
EPFNOSUPPORT
sourcepub const PROTONOSUPPORT: Errno = Self::from_errno(errno::EPROTONOSUPPORT)
pub const PROTONOSUPPORT: Errno = Self::from_errno(errno::EPROTONOSUPPORT)
EPROTONOSUPPORT
sourcepub const SOCKTNOSUPPORT: Errno = Self::from_errno(errno::ESOCKTNOSUPPORT)
pub const SOCKTNOSUPPORT: Errno = Self::from_errno(errno::ESOCKTNOSUPPORT)
ESOCKTNOSUPPORT
sourcepub const TOOMANYREFS: Errno = Self::from_errno(errno::ETOOMANYREFS)
pub const TOOMANYREFS: Errno = Self::from_errno(errno::ETOOMANYREFS)
ETOOMANYREFS
sourcepub const WOULDBLOCK: Errno = Self::from_errno(errno::EWOULDBLOCK)
pub const WOULDBLOCK: Errno = Self::from_errno(errno::EWOULDBLOCK)
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)>
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()