#[repr(i32)]
#[non_exhaustive]
pub enum Errno {
Show 97 variants
UnknownErrno,
EPERM,
ENOENT,
ESRCH,
EINTR,
EIO,
ENXIO,
E2BIG,
ENOEXEC,
EBADF,
ECHILD,
EDEADLK,
ENOMEM,
EACCES,
EFAULT,
ENOTBLK,
EBUSY,
EEXIST,
EXDEV,
ENODEV,
ENOTDIR,
EISDIR,
EINVAL,
ENFILE,
EMFILE,
ENOTTY,
ETXTBSY,
EFBIG,
ENOSPC,
ESPIPE,
EROFS,
EMLINK,
EPIPE,
EDOM,
ERANGE,
EAGAIN,
EINPROGRESS,
EALREADY,
ENOTSOCK,
EDESTADDRREQ,
EMSGSIZE,
EPROTOTYPE,
ENOPROTOOPT,
EPROTONOSUPPORT,
ESOCKTNOSUPPORT,
ENOTSUP,
EPFNOSUPPORT,
EAFNOSUPPORT,
EADDRINUSE,
EADDRNOTAVAIL,
ENETDOWN,
ENETUNREACH,
ENETRESET,
ECONNABORTED,
ECONNRESET,
ENOBUFS,
EISCONN,
ENOTCONN,
ESHUTDOWN,
ETOOMANYREFS,
ETIMEDOUT,
ECONNREFUSED,
ELOOP,
ENAMETOOLONG,
EHOSTDOWN,
EHOSTUNREACH,
ENOTEMPTY,
EPROCLIM,
EUSERS,
EDQUOT,
ESTALE,
EREMOTE,
EBADRPC,
ERPCMISMATCH,
EPROGUNAVAIL,
EPROGMISMATCH,
EPROCUNAVAIL,
ENOLCK,
ENOSYS,
EFTYPE,
EAUTH,
ENEEDAUTH,
EIDRM,
ENOMSG,
EOVERFLOW,
ECANCELED,
EILSEQ,
ENOATTR,
EDOOFUS,
EBADMSG,
EMULTIHOP,
ENOLINK,
EPROTO,
ENOTCAPABLE,
ECAPMODE,
ENOTRECOVERABLE,
EOWNERDEAD,
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
UnknownErrno
EPERM
ENOENT
ESRCH
EINTR
EIO
ENXIO
E2BIG
ENOEXEC
EBADF
ECHILD
EDEADLK
ENOMEM
EACCES
EFAULT
ENOTBLK
EBUSY
EEXIST
EXDEV
ENODEV
ENOTDIR
EISDIR
EINVAL
ENFILE
EMFILE
ENOTTY
ETXTBSY
EFBIG
ENOSPC
ESPIPE
EROFS
EMLINK
EPIPE
EDOM
ERANGE
EAGAIN
EINPROGRESS
EALREADY
ENOTSOCK
EDESTADDRREQ
EMSGSIZE
EPROTOTYPE
ENOPROTOOPT
EPROTONOSUPPORT
ESOCKTNOSUPPORT
ENOTSUP
EPFNOSUPPORT
EAFNOSUPPORT
EADDRINUSE
EADDRNOTAVAIL
ENETDOWN
ENETUNREACH
ENETRESET
ECONNABORTED
ECONNRESET
ENOBUFS
EISCONN
ENOTCONN
ESHUTDOWN
ETOOMANYREFS
ETIMEDOUT
ECONNREFUSED
ELOOP
ENAMETOOLONG
EHOSTDOWN
EHOSTUNREACH
ENOTEMPTY
EPROCLIM
EUSERS
EDQUOT
ESTALE
EREMOTE
EBADRPC
ERPCMISMATCH
EPROGUNAVAIL
EPROGMISMATCH
EPROCUNAVAIL
ENOLCK
ENOSYS
EFTYPE
EAUTH
ENEEDAUTH
EIDRM
ENOMSG
EOVERFLOW
ECANCELED
EILSEQ
ENOATTR
EDOOFUS
EBADMSG
EMULTIHOP
ENOLINK
EPROTO
ENOTCAPABLE
ECAPMODE
ENOTRECOVERABLE
EOWNERDEAD
Implementations
sourceimpl Errno
impl Errno
sourcepub const fn as_errno(self) -> Option<Errno>
👎 Deprecated since 0.22.0: It’s a no-op now; just delete it.
pub const fn as_errno(self) -> Option<Errno>
It’s a no-op now; just delete it.
sourcepub fn from_errno(errno: Errno) -> Errno
👎 Deprecated since 0.22.0: It’s a no-op now; just delete it.
pub fn from_errno(errno: Errno) -> Errno
It’s a no-op now; just delete it.
Create a nix Error from a given errno
sourcepub const fn invalid_argument() -> Errno
👎 Deprecated since 0.22.0: Use Errno::EINVAL instead
pub const fn invalid_argument() -> Errno
Use Errno::EINVAL instead
Create a new invalid argument error (EINVAL
)
pub fn last() -> Errno
pub fn desc(self) -> &'static str
pub const fn from_i32(err: i32) -> Errno
pub fn clear()
sourcepub fn result<S>(value: S) -> Result<S, Errno> where
S: ErrnoSentinel + PartialEq<S>,
pub fn result<S>(value: S) -> Result<S, Errno> where
S: ErrnoSentinel + PartialEq<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) -> Errno
👎 Deprecated since 0.22.0: Use Errno::… instead
pub const fn Sys(errno: Errno) -> Errno
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