pub struct Errno(/* private fields */);
Implementations§
Source§impl Errno
impl Errno
pub const EINVAL: Self
pub const EDEADLK: Self
pub const ENAMETOOLONG: Self
pub const ENOLCK: Self
pub const ENOSYS: Self
pub const ENOTEMPTY: Self
pub const ELOOP: Self
pub const EWOULDBLOCK: Self
pub const ENOMSG: Self
pub const EIDRM: Self
pub const ECHRNG: Self
pub const EL2NSYNC: Self
pub const EL3HLT: Self
pub const EL3RST: Self
pub const ELNRNG: Self
pub const EUNATCH: Self
pub const ENOCSI: Self
pub const EL2HLT: Self
pub const EBADE: Self
pub const EBADR: Self
pub const EXFULL: Self
pub const ENOANO: Self
pub const EBADRQC: Self
pub const EBADSLT: Self
pub const EBFONT: Self
pub const ENOSTR: Self
pub const ENODATA: Self
pub const ETIME: Self
pub const ENOSR: Self
pub const ENONET: Self
pub const ENOPKG: Self
pub const EREMOTE: Self
pub const ENOLINK: Self
pub const EADV: Self
pub const ESRMNT: Self
pub const ECOMM: Self
pub const EPROTO: Self
pub const EMULTIHOP: Self
pub const EDOTDOT: Self
pub const EBADMSG: Self
pub const EOVERFLOW: Self
pub const ENOTUNIQ: Self
pub const EBADFD: Self
pub const EREMCHG: Self
pub const ELIBACC: Self
pub const ELIBBAD: Self
pub const ELIBSCN: Self
pub const ELIBMAX: Self
pub const ELIBEXEC: Self
pub const EILSEQ: Self
pub const ERESTART: Self
pub const ESTRPIPE: Self
pub const EUSERS: Self
pub const ENOTSOCK: Self
pub const EDESTADDRREQ: Self
pub const EMSGSIZE: Self
pub const EPROTOTYPE: Self
pub const ENOPROTOOPT: Self
pub const EPROTONOSUPPORT: Self
pub const ESOCKTNOSUPPORT: Self
pub const EOPNOTSUPP: Self
pub const EPFNOSUPPORT: Self
pub const EAFNOSUPPORT: Self
pub const EADDRINUSE: Self
pub const EADDRNOTAVAIL: Self
pub const ENETDOWN: Self
pub const ENETUNREACH: Self
pub const ENETRESET: Self
pub const ECONNABORTED: Self
pub const ECONNRESET: Self
pub const ENOBUFS: Self
pub const EISCONN: Self
pub const ENOTCONN: Self
pub const ESHUTDOWN: Self
pub const ETOOMANYREFS: Self
pub const ETIMEDOUT: Self
pub const ECONNREFUSED: Self
pub const EHOSTDOWN: Self
pub const EHOSTUNREACH: Self
pub const EALREADY: Self
pub const EINPROGRESS: Self
pub const ESTALE: Self
pub const EUCLEAN: Self
pub const ENOTNAM: Self
pub const ENAVAIL: Self
pub const EISNAM: Self
pub const EREMOTEIO: Self
pub const EDQUOT: Self
pub const ENOMEDIUM: Self
pub const EMEDIUMTYPE: Self
pub const ECANCELED: Self
pub const ENOKEY: Self
pub const EKEYEXPIRED: Self
pub const EKEYREVOKED: Self
pub const EKEYREJECTED: Self
pub const EOWNERDEAD: Self
pub const ENOTRECOVERABLE: Self
pub const ERFKILL: Self
pub const EHWPOISON: Self
pub const EINTR: Self
pub const ENFILE: Self
pub const EPIPE: Self
pub const ESPIPE: Self
pub const EBADF: Self
pub const EPERM: Self
pub const EFAULT: Self
pub const ESRCH: Self
pub const ENOENT: Self
pub const ENOTTY: Self
pub const EEXIST: Self
pub const ECHILD: Self
pub const EACCES: Self
pub const ENOEXEC: Self
pub const ENOTDIR: Self
pub const EDEADLOCK: Self
pub const EAGAIN: Self
pub const ENOTSUP: Self = Self::EOPNOTSUPP
Sourcepub const MAX: Self
pub const MAX: Self
From MAX_ERRNO in include/linux/err.h in kernel source. This doesn’t seem to be exposed in the installed kernel headers from which we generate bindings. https://github.com/torvalds/linux/blob/a4d7d701121981e3c3fe69ade376fe9f26324161/include/linux/err.h#L18
pub const fn from_u16(val: u16) -> Option<Self>
Sourcepub const fn to_negated_i64(self) -> i64
pub const fn to_negated_i64(self) -> i64
For C interop.
Sourcepub const fn to_negated_i32(self) -> i32
pub const fn to_negated_i32(self) -> i32
For C interop.
Sourcepub fn from_libc_errno() -> Self
pub fn from_libc_errno() -> Self
Get libc’s errno (global for the current thread).
Sourcepub fn result_from_libc_errno<T>(sentinel: T, x: T) -> Result<T, Self>where
T: Eq,
pub fn result_from_libc_errno<T>(sentinel: T, x: T) -> Result<T, Self>where
T: Eq,
Get a Result from the return value of a libc function that uses a sentinel error value, and stores the errors themselves in errno.
Sourcepub fn result_from_libc_errnum(errnum: i32) -> Result<(), Self>
pub fn result_from_libc_errnum(errnum: i32) -> Result<(), Self>
Get a Result from a libc errnum
return value, where 0 is used to
indicate “no error”, and non-zero is an errno value. An example of such
a function is libc::posix_spawn
.
Panics if errnum
is out of range. This shouldn’t be the case for any errnum
obtained
from libc APIs.
Sourcepub fn from_libc_errnum(errnum: i32) -> Option<Self>
pub fn from_libc_errnum(errnum: i32) -> Option<Self>
Convert from a libc error value. Returns None
if out of range.