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.
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)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)