#[non_exhaustive]#[repr(i32)]pub enum Errno {
Show 107 variants
UnknownErrno = 0,
EPERM = 1,
ENOENT = 2,
ESRCH = 3,
EINTR = 4,
EIO = 5,
ENXIO = 6,
E2BIG = 7,
ENOEXEC = 8,
EBADF = 9,
ECHILD = 10,
EDEADLK = 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,
EAGAIN = 35,
EINPROGRESS = 36,
EALREADY = 37,
ENOTSOCK = 38,
EDESTADDRREQ = 39,
EMSGSIZE = 40,
EPROTOTYPE = 41,
ENOPROTOOPT = 42,
EPROTONOSUPPORT = 43,
ESOCKTNOSUPPORT = 44,
ENOTSUP = 45,
EPFNOSUPPORT = 46,
EAFNOSUPPORT = 47,
EADDRINUSE = 48,
EADDRNOTAVAIL = 49,
ENETDOWN = 50,
ENETUNREACH = 51,
ENETRESET = 52,
ECONNABORTED = 53,
ECONNRESET = 54,
ENOBUFS = 55,
EISCONN = 56,
ENOTCONN = 57,
ESHUTDOWN = 58,
ETOOMANYREFS = 59,
ETIMEDOUT = 60,
ECONNREFUSED = 61,
ELOOP = 62,
ENAMETOOLONG = 63,
EHOSTDOWN = 64,
EHOSTUNREACH = 65,
ENOTEMPTY = 66,
EPROCLIM = 67,
EUSERS = 68,
EDQUOT = 69,
ESTALE = 70,
EREMOTE = 71,
EBADRPC = 72,
ERPCMISMATCH = 73,
EPROGUNAVAIL = 74,
EPROGMISMATCH = 75,
EPROCUNAVAIL = 76,
ENOLCK = 77,
ENOSYS = 78,
EFTYPE = 79,
EAUTH = 80,
ENEEDAUTH = 81,
EPWROFF = 82,
EDEVERR = 83,
EOVERFLOW = 84,
EBADEXEC = 85,
EBADARCH = 86,
ESHLIBVERS = 87,
EBADMACHO = 88,
ECANCELED = 89,
EIDRM = 90,
ENOMSG = 91,
EILSEQ = 92,
ENOATTR = 93,
EBADMSG = 94,
EMULTIHOP = 95,
ENODATA = 96,
ENOLINK = 97,
ENOSR = 98,
ENOSTR = 99,
EPROTO = 100,
ETIME = 101,
EOPNOTSUPP = 102,
ENOPOLICY = 103,
ENOTRECOVERABLE = 104,
EOWNERDEAD = 105,
EQFULL = 106,
}
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
EDEADLK = 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
EAGAIN = 35
EINPROGRESS = 36
EALREADY = 37
ENOTSOCK = 38
EDESTADDRREQ = 39
EMSGSIZE = 40
EPROTOTYPE = 41
ENOPROTOOPT = 42
EPROTONOSUPPORT = 43
ESOCKTNOSUPPORT = 44
ENOTSUP = 45
EPFNOSUPPORT = 46
EAFNOSUPPORT = 47
EADDRINUSE = 48
EADDRNOTAVAIL = 49
ENETDOWN = 50
ENETUNREACH = 51
ENETRESET = 52
ECONNABORTED = 53
ECONNRESET = 54
ENOBUFS = 55
EISCONN = 56
ENOTCONN = 57
ESHUTDOWN = 58
ETOOMANYREFS = 59
ETIMEDOUT = 60
ECONNREFUSED = 61
ELOOP = 62
ENAMETOOLONG = 63
EHOSTDOWN = 64
EHOSTUNREACH = 65
ENOTEMPTY = 66
EPROCLIM = 67
EUSERS = 68
EDQUOT = 69
ESTALE = 70
EREMOTE = 71
EBADRPC = 72
ERPCMISMATCH = 73
EPROGUNAVAIL = 74
EPROGMISMATCH = 75
EPROCUNAVAIL = 76
ENOLCK = 77
ENOSYS = 78
EFTYPE = 79
EAUTH = 80
ENEEDAUTH = 81
EPWROFF = 82
EDEVERR = 83
EOVERFLOW = 84
EBADEXEC = 85
EBADARCH = 86
ESHLIBVERS = 87
EBADMACHO = 88
ECANCELED = 89
EIDRM = 90
ENOMSG = 91
EILSEQ = 92
ENOATTR = 93
EBADMSG = 94
EMULTIHOP = 95
ENODATA = 96
ENOLINK = 97
ENOSR = 98
ENOSTR = 99
EPROTO = 100
ETIME = 101
EOPNOTSUPP = 102
ENOPOLICY = 103
ENOTRECOVERABLE = 104
EOWNERDEAD = 105
EQFULL = 106
Implementations§
source§impl Errno
impl Errno
sourcepub fn set(self)
pub fn set(self)
Sets the value of errno.
§Example
use nix::errno::Errno;
Errno::EIO.set();
assert_eq!(Errno::last(), Errno::EIO);
pub const fn from_i32(err: i32) -> Errno
👎Deprecated since 0.28.0: please use
Errno::from_raw()
insteadpub const fn from_raw(err: i32) -> Errno
pub fn desc(self) -> &'static str
sourcepub fn clear()
pub fn clear()
Sets the platform-specific errno to no-error
use nix::errno::Errno;
Errno::EIO.set();
Errno::clear();
let err = Errno::last();
assert_ne!(err, Errno::EIO);
assert_eq!(err, Errno::from_raw(0));
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.
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