#[repr(i32)]
#[non_exhaustive]
pub enum Errno {
Show 122 variants
UnknownErrno,
EPERM,
ENOENT,
ESRCH,
EINTR,
EIO,
ENXIO,
E2BIG,
ENOEXEC,
EBADF,
ECHILD,
EAGAIN,
ENOMEM,
EACCES,
EFAULT,
ENOTBLK,
EBUSY,
EEXIST,
EXDEV,
ENODEV,
ENOTDIR,
EISDIR,
EINVAL,
ENFILE,
EMFILE,
ENOTTY,
ETXTBSY,
EFBIG,
ENOSPC,
ESPIPE,
EROFS,
EMLINK,
EPIPE,
EDOM,
ERANGE,
ENOMSG,
EIDRM,
ECHRNG,
EL2NSYNC,
EL3HLT,
EL3RST,
ELNRNG,
EUNATCH,
ENOCSI,
EL2HLT,
EDEADLK,
ENOLCK,
ECANCELED,
ENOTSUP,
EDQUOT,
EBADE,
EBADR,
EXFULL,
ENOANO,
EBADRQC,
EBADSLT,
EDEADLOCK,
EBFONT,
EOWNERDEAD,
ENOTRECOVERABLE,
ENOSTR,
ENODATA,
ETIME,
ENOSR,
ENONET,
ENOPKG,
EREMOTE,
ENOLINK,
EADV,
ESRMNT,
ECOMM,
EPROTO,
ELOCKUNMAPPED,
ENOTACTIVE,
EMULTIHOP,
EBADMSG,
ENAMETOOLONG,
EOVERFLOW,
ENOTUNIQ,
EBADFD,
EREMCHG,
ELIBACC,
ELIBBAD,
ELIBSCN,
ELIBMAX,
ELIBEXEC,
EILSEQ,
ENOSYS,
ELOOP,
ERESTART,
ESTRPIPE,
ENOTEMPTY,
EUSERS,
ENOTSOCK,
EDESTADDRREQ,
EMSGSIZE,
EPROTOTYPE,
ENOPROTOOPT,
EPROTONOSUPPORT,
ESOCKTNOSUPPORT,
EOPNOTSUPP,
EPFNOSUPPORT,
EAFNOSUPPORT,
EADDRINUSE,
EADDRNOTAVAIL,
ENETDOWN,
ENETUNREACH,
ENETRESET,
ECONNABORTED,
ECONNRESET,
ENOBUFS,
EISCONN,
ENOTCONN,
ESHUTDOWN,
ETOOMANYREFS,
ETIMEDOUT,
ECONNREFUSED,
EHOSTDOWN,
EHOSTUNREACH,
EALREADY,
EINPROGRESS,
ESTALE,
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
UnknownErrno
EPERM
ENOENT
ESRCH
EINTR
EIO
ENXIO
E2BIG
ENOEXEC
EBADF
ECHILD
EAGAIN
ENOMEM
EACCES
EFAULT
ENOTBLK
EBUSY
EEXIST
EXDEV
ENODEV
ENOTDIR
EISDIR
EINVAL
ENFILE
EMFILE
ENOTTY
ETXTBSY
EFBIG
ENOSPC
ESPIPE
EROFS
EMLINK
EPIPE
EDOM
ERANGE
ENOMSG
EIDRM
ECHRNG
EL2NSYNC
EL3HLT
EL3RST
ELNRNG
EUNATCH
ENOCSI
EL2HLT
EDEADLK
ENOLCK
ECANCELED
ENOTSUP
EDQUOT
EBADE
EBADR
EXFULL
ENOANO
EBADRQC
EBADSLT
EDEADLOCK
EBFONT
EOWNERDEAD
ENOTRECOVERABLE
ENOSTR
ENODATA
ETIME
ENOSR
ENONET
ENOPKG
EREMOTE
ENOLINK
EADV
ESRMNT
ECOMM
EPROTO
ELOCKUNMAPPED
ENOTACTIVE
EMULTIHOP
EBADMSG
ENAMETOOLONG
EOVERFLOW
ENOTUNIQ
EBADFD
EREMCHG
ELIBACC
ELIBBAD
ELIBSCN
ELIBMAX
ELIBEXEC
EILSEQ
ENOSYS
ELOOP
ERESTART
ESTRPIPE
ENOTEMPTY
EUSERS
ENOTSOCK
EDESTADDRREQ
EMSGSIZE
EPROTOTYPE
ENOPROTOOPT
EPROTONOSUPPORT
ESOCKTNOSUPPORT
EOPNOTSUPP
EPFNOSUPPORT
EAFNOSUPPORT
EADDRINUSE
EADDRNOTAVAIL
ENETDOWN
ENETUNREACH
ENETRESET
ECONNABORTED
ECONNRESET
ENOBUFS
EISCONN
ENOTCONN
ESHUTDOWN
ETOOMANYREFS
ETIMEDOUT
ECONNREFUSED
EHOSTDOWN
EHOSTUNREACH
EALREADY
EINPROGRESS
ESTALE
Implementations
sourceimpl Errno
impl Errno
sourcepub const fn as_errno(self) -> Option<Self>
👎 Deprecated since 0.22.0: It’s a no-op now; just delete it.
pub const fn as_errno(self) -> Option<Self>
It’s a no-op now; just delete it.
sourcepub fn from_errno(errno: Errno) -> Error
👎 Deprecated since 0.22.0: It’s a no-op now; just delete it.
pub fn from_errno(errno: Errno) -> Error
It’s a no-op now; just delete it.
Create a nix Error from a given errno
sourcepub const fn invalid_argument() -> Error
👎 Deprecated since 0.22.0: Use Errno::EINVAL instead
pub const fn invalid_argument() -> Error
Use Errno::EINVAL instead
Create a new invalid argument error (EINVAL
)
pub fn last() -> Self
pub fn desc(self) -> &'static str
pub const fn from_i32(err: i32) -> Errno
pub fn clear()
sourcepub fn result<S: ErrnoSentinel + PartialEq<S>>(value: S) -> Result<S>
pub fn result<S: ErrnoSentinel + PartialEq<S>>(value: S) -> Result<S>
Returns Ok(value)
if it does not contain the sentinel value. This
should not be used when -1
is not the errno sentinel value.
sourcepub const fn Sys(errno: Errno) -> Error
👎 Deprecated since 0.22.0: Use Errno::… instead
pub const fn Sys(errno: Errno) -> Error
Use Errno::… instead
Backwards compatibility hack for Nix <= 0.21.0 users
In older versions of Nix, Error::Sys
was an enum variant. Now it’s a
function, which is compatible with most of the former use cases of the
enum variant. But you should use Error(Errno::...)
instead.
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