Error

Type Alias Error 

Source
pub type Error = Errno;
Expand description

Nix’s main error type.

It’s a wrapper around Errno. As such, it’s very interoperable with std::io::Error, but it has the advantages of:

  • Clone
  • Copy
  • Eq
  • Small size
  • Represents all of the system’s errnos, instead of just the most common ones.

Aliased Type§

#[repr(i32)]
pub enum Error {
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§

§

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

§

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

§

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

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 4 bytes

Size for each variant:

  • UnknownErrno: 0 bytes
  • EPERM: 0 bytes
  • ENOENT: 0 bytes
  • ESRCH: 0 bytes
  • EINTR: 0 bytes
  • EIO: 0 bytes
  • ENXIO: 0 bytes
  • E2BIG: 0 bytes
  • ENOEXEC: 0 bytes
  • EBADF: 0 bytes
  • ECHILD: 0 bytes
  • EAGAIN: 0 bytes
  • ENOMEM: 0 bytes
  • EACCES: 0 bytes
  • EFAULT: 0 bytes
  • ENOTBLK: 0 bytes
  • EBUSY: 0 bytes
  • EEXIST: 0 bytes
  • EXDEV: 0 bytes
  • ENODEV: 0 bytes
  • ENOTDIR: 0 bytes
  • EISDIR: 0 bytes
  • EINVAL: 0 bytes
  • ENFILE: 0 bytes
  • EMFILE: 0 bytes
  • ENOTTY: 0 bytes
  • ETXTBSY: 0 bytes
  • EFBIG: 0 bytes
  • ENOSPC: 0 bytes
  • ESPIPE: 0 bytes
  • EROFS: 0 bytes
  • EMLINK: 0 bytes
  • EPIPE: 0 bytes
  • EDOM: 0 bytes
  • ERANGE: 0 bytes
  • EDEADLK: 0 bytes
  • ENAMETOOLONG: 0 bytes
  • ENOLCK: 0 bytes
  • ENOSYS: 0 bytes
  • ENOTEMPTY: 0 bytes
  • ELOOP: 0 bytes
  • ENOMSG: 0 bytes
  • EIDRM: 0 bytes
  • ECHRNG: 0 bytes
  • EL2NSYNC: 0 bytes
  • EL3HLT: 0 bytes
  • EL3RST: 0 bytes
  • ELNRNG: 0 bytes
  • EUNATCH: 0 bytes
  • ENOCSI: 0 bytes
  • EL2HLT: 0 bytes
  • EBADE: 0 bytes
  • EBADR: 0 bytes
  • EXFULL: 0 bytes
  • ENOANO: 0 bytes
  • EBADRQC: 0 bytes
  • EBADSLT: 0 bytes
  • EBFONT: 0 bytes
  • ENOSTR: 0 bytes
  • ENODATA: 0 bytes
  • ETIME: 0 bytes
  • ENOSR: 0 bytes
  • ENONET: 0 bytes
  • ENOPKG: 0 bytes
  • EREMOTE: 0 bytes
  • ENOLINK: 0 bytes
  • EADV: 0 bytes
  • ESRMNT: 0 bytes
  • ECOMM: 0 bytes
  • EPROTO: 0 bytes
  • EMULTIHOP: 0 bytes
  • EDOTDOT: 0 bytes
  • EBADMSG: 0 bytes
  • EOVERFLOW: 0 bytes
  • ENOTUNIQ: 0 bytes
  • EBADFD: 0 bytes
  • EREMCHG: 0 bytes
  • ELIBACC: 0 bytes
  • ELIBBAD: 0 bytes
  • ELIBSCN: 0 bytes
  • ELIBMAX: 0 bytes
  • ELIBEXEC: 0 bytes
  • EILSEQ: 0 bytes
  • ERESTART: 0 bytes
  • ESTRPIPE: 0 bytes
  • EUSERS: 0 bytes
  • ENOTSOCK: 0 bytes
  • EDESTADDRREQ: 0 bytes
  • EMSGSIZE: 0 bytes
  • EPROTOTYPE: 0 bytes
  • ENOPROTOOPT: 0 bytes
  • EPROTONOSUPPORT: 0 bytes
  • ESOCKTNOSUPPORT: 0 bytes
  • EOPNOTSUPP: 0 bytes
  • EPFNOSUPPORT: 0 bytes
  • EAFNOSUPPORT: 0 bytes
  • EADDRINUSE: 0 bytes
  • EADDRNOTAVAIL: 0 bytes
  • ENETDOWN: 0 bytes
  • ENETUNREACH: 0 bytes
  • ENETRESET: 0 bytes
  • ECONNABORTED: 0 bytes
  • ECONNRESET: 0 bytes
  • ENOBUFS: 0 bytes
  • EISCONN: 0 bytes
  • ENOTCONN: 0 bytes
  • ESHUTDOWN: 0 bytes
  • ETOOMANYREFS: 0 bytes
  • ETIMEDOUT: 0 bytes
  • ECONNREFUSED: 0 bytes
  • EHOSTDOWN: 0 bytes
  • EHOSTUNREACH: 0 bytes
  • EALREADY: 0 bytes
  • EINPROGRESS: 0 bytes
  • ESTALE: 0 bytes
  • EUCLEAN: 0 bytes
  • ENOTNAM: 0 bytes
  • ENAVAIL: 0 bytes
  • EISNAM: 0 bytes
  • EREMOTEIO: 0 bytes
  • EDQUOT: 0 bytes
  • ENOMEDIUM: 0 bytes
  • EMEDIUMTYPE: 0 bytes
  • ECANCELED: 0 bytes
  • ENOKEY: 0 bytes
  • EKEYEXPIRED: 0 bytes
  • EKEYREVOKED: 0 bytes
  • EKEYREJECTED: 0 bytes
  • EOWNERDEAD: 0 bytes
  • ENOTRECOVERABLE: 0 bytes
  • ERFKILL: 0 bytes
  • EHWPOISON: 0 bytes