#[non_exhaustive]#[repr(i32)]pub enum Errno {
Show 132 variants
UnknownErrno = 0,
EPERM = 1,
ENOENT = 2,
ESRCH = 3,
EINTR = 4,
EIO = 5,
ENXIO = 6,
E2BIG = 7,
ENOEXEC = 8,
EBADF = 9,
ECHILD = 10,
EAGAIN = 11,
ENOMEM = 12,
EACCES = 13,
EFAULT = 14,
ENOTBLK = 15,
EBUSY = 16,
EEXIST = 17,
EXDEV = 18,
ENODEV = 19,
ENOTDIR = 20,
EISDIR = 21,
EINVAL = 22,
ENFILE = 23,
EMFILE = 24,
ENOTTY = 25,
ETXTBSY = 26,
EFBIG = 27,
ENOSPC = 28,
ESPIPE = 29,
EROFS = 30,
EMLINK = 31,
EPIPE = 32,
EDOM = 33,
ERANGE = 34,
EDEADLK = 35,
ENAMETOOLONG = 36,
ENOLCK = 37,
ENOSYS = 38,
ENOTEMPTY = 39,
ELOOP = 40,
ENOMSG = 42,
EIDRM = 43,
ECHRNG = 44,
EL2NSYNC = 45,
EL3HLT = 46,
EL3RST = 47,
ELNRNG = 48,
EUNATCH = 49,
ENOCSI = 50,
EL2HLT = 51,
EBADE = 52,
EBADR = 53,
EXFULL = 54,
ENOANO = 55,
EBADRQC = 56,
EBADSLT = 57,
EBFONT = 59,
ENOSTR = 60,
ENODATA = 61,
ETIME = 62,
ENOSR = 63,
ENONET = 64,
ENOPKG = 65,
EREMOTE = 66,
ENOLINK = 67,
EADV = 68,
ESRMNT = 69,
ECOMM = 70,
EPROTO = 71,
EMULTIHOP = 72,
EDOTDOT = 73,
EBADMSG = 74,
EOVERFLOW = 75,
ENOTUNIQ = 76,
EBADFD = 77,
EREMCHG = 78,
ELIBACC = 79,
ELIBBAD = 80,
ELIBSCN = 81,
ELIBMAX = 82,
ELIBEXEC = 83,
EILSEQ = 84,
ERESTART = 85,
ESTRPIPE = 86,
EUSERS = 87,
ENOTSOCK = 88,
EDESTADDRREQ = 89,
EMSGSIZE = 90,
EPROTOTYPE = 91,
ENOPROTOOPT = 92,
EPROTONOSUPPORT = 93,
ESOCKTNOSUPPORT = 94,
EOPNOTSUPP = 95,
EPFNOSUPPORT = 96,
EAFNOSUPPORT = 97,
EADDRINUSE = 98,
EADDRNOTAVAIL = 99,
ENETDOWN = 100,
ENETUNREACH = 101,
ENETRESET = 102,
ECONNABORTED = 103,
ECONNRESET = 104,
ENOBUFS = 105,
EISCONN = 106,
ENOTCONN = 107,
ESHUTDOWN = 108,
ETOOMANYREFS = 109,
ETIMEDOUT = 110,
ECONNREFUSED = 111,
EHOSTDOWN = 112,
EHOSTUNREACH = 113,
EALREADY = 114,
EINPROGRESS = 115,
ESTALE = 116,
EUCLEAN = 117,
ENOTNAM = 118,
ENAVAIL = 119,
EISNAM = 120,
EREMOTEIO = 121,
EDQUOT = 122,
ENOMEDIUM = 123,
EMEDIUMTYPE = 124,
ECANCELED = 125,
ENOKEY = 126,
EKEYEXPIRED = 127,
EKEYREVOKED = 128,
EKEYREJECTED = 129,
EOWNERDEAD = 130,
ENOTRECOVERABLE = 131,
ERFKILL = 132,
EHWPOISON = 133,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownErrno = 0
EPERM = 1
ENOENT = 2
ESRCH = 3
EINTR = 4
EIO = 5
ENXIO = 6
E2BIG = 7
ENOEXEC = 8
EBADF = 9
ECHILD = 10
EAGAIN = 11
ENOMEM = 12
EACCES = 13
EFAULT = 14
ENOTBLK = 15
EBUSY = 16
EEXIST = 17
EXDEV = 18
ENODEV = 19
ENOTDIR = 20
EISDIR = 21
EINVAL = 22
ENFILE = 23
EMFILE = 24
ENOTTY = 25
ETXTBSY = 26
EFBIG = 27
ENOSPC = 28
ESPIPE = 29
EROFS = 30
EMLINK = 31
EPIPE = 32
EDOM = 33
ERANGE = 34
EDEADLK = 35
ENAMETOOLONG = 36
ENOLCK = 37
ENOSYS = 38
ENOTEMPTY = 39
ELOOP = 40
ENOMSG = 42
EIDRM = 43
ECHRNG = 44
EL2NSYNC = 45
EL3HLT = 46
EL3RST = 47
ELNRNG = 48
EUNATCH = 49
ENOCSI = 50
EL2HLT = 51
EBADE = 52
EBADR = 53
EXFULL = 54
ENOANO = 55
EBADRQC = 56
EBADSLT = 57
EBFONT = 59
ENOSTR = 60
ENODATA = 61
ETIME = 62
ENOSR = 63
ENONET = 64
ENOPKG = 65
EREMOTE = 66
ENOLINK = 67
EADV = 68
ESRMNT = 69
ECOMM = 70
EPROTO = 71
EMULTIHOP = 72
EDOTDOT = 73
EBADMSG = 74
EOVERFLOW = 75
ENOTUNIQ = 76
EBADFD = 77
EREMCHG = 78
ELIBACC = 79
ELIBBAD = 80
ELIBSCN = 81
ELIBMAX = 82
ELIBEXEC = 83
EILSEQ = 84
ERESTART = 85
ESTRPIPE = 86
EUSERS = 87
ENOTSOCK = 88
EDESTADDRREQ = 89
EMSGSIZE = 90
EPROTOTYPE = 91
ENOPROTOOPT = 92
EPROTONOSUPPORT = 93
ESOCKTNOSUPPORT = 94
EOPNOTSUPP = 95
EPFNOSUPPORT = 96
EAFNOSUPPORT = 97
EADDRINUSE = 98
EADDRNOTAVAIL = 99
ENETDOWN = 100
ENETUNREACH = 101
ENETRESET = 102
ECONNABORTED = 103
ECONNRESET = 104
ENOBUFS = 105
EISCONN = 106
ENOTCONN = 107
ESHUTDOWN = 108
ETOOMANYREFS = 109
ETIMEDOUT = 110
ECONNREFUSED = 111
EHOSTDOWN = 112
EHOSTUNREACH = 113
EALREADY = 114
EINPROGRESS = 115
ESTALE = 116
EUCLEAN = 117
ENOTNAM = 118
ENAVAIL = 119
EISNAM = 120
EREMOTEIO = 121
EDQUOT = 122
ENOMEDIUM = 123
EMEDIUMTYPE = 124
ECANCELED = 125
ENOKEY = 126
EKEYEXPIRED = 127
EKEYREVOKED = 128
EKEYREJECTED = 129
EOWNERDEAD = 130
ENOTRECOVERABLE = 131
ERFKILL = 132
EHWPOISON = 133
Implementations§
source§impl 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>
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
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
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
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§
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 for Errno
impl PartialEq for Errno
impl Copy for Errno
impl Eq for Errno
impl StructuralPartialEq for Errno
Auto Trait Implementations§
impl Freeze for Errno
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)