Enum Errno
#[repr(i32)]
#[non_exhaustive]
pub enum Errno
Variants
-
UnknownErrno = 0 -
EPERM = libc::EPERM -
ENOENT = libc::ENOENT -
ESRCH = libc::ESRCH -
EINTR = libc::EINTR -
EIO = libc::EIO -
ENXIO = libc::ENXIO -
E2BIG = libc::E2BIG -
ENOEXEC = libc::ENOEXEC -
EBADF = libc::EBADF -
ECHILD = libc::ECHILD -
EAGAIN = libc::EAGAIN -
ENOMEM = libc::ENOMEM -
EACCES = libc::EACCES -
EFAULT = libc::EFAULT -
ENOTBLK = libc::ENOTBLK -
EBUSY = libc::EBUSY -
EEXIST = libc::EEXIST -
EXDEV = libc::EXDEV -
ENODEV = libc::ENODEV -
ENOTDIR = libc::ENOTDIR -
EISDIR = libc::EISDIR -
EINVAL = libc::EINVAL -
ENFILE = libc::ENFILE -
EMFILE = libc::EMFILE -
ENOTTY = libc::ENOTTY -
ETXTBSY = libc::ETXTBSY -
EFBIG = libc::EFBIG -
ENOSPC = libc::ENOSPC -
ESPIPE = libc::ESPIPE -
EROFS = libc::EROFS -
EMLINK = libc::EMLINK -
EPIPE = libc::EPIPE -
EDOM = libc::EDOM -
ERANGE = libc::ERANGE -
EDEADLK = libc::EDEADLK -
ENAMETOOLONG = libc::ENAMETOOLONG -
ENOLCK = libc::ENOLCK -
ENOSYS = libc::ENOSYS -
ENOTEMPTY = libc::ENOTEMPTY -
ELOOP = libc::ELOOP -
ENOMSG = libc::ENOMSG -
EIDRM = libc::EIDRM -
ECHRNG = libc::ECHRNG -
EL2NSYNC = libc::EL2NSYNC -
EL3HLT = libc::EL3HLT -
EL3RST = libc::EL3RST -
ELNRNG = libc::ELNRNG -
EUNATCH = libc::EUNATCH -
ENOCSI = libc::ENOCSI -
EL2HLT = libc::EL2HLT -
EBADE = libc::EBADE -
EBADR = libc::EBADR -
EXFULL = libc::EXFULL -
ENOANO = libc::ENOANO -
EBADRQC = libc::EBADRQC -
EBADSLT = libc::EBADSLT -
EBFONT = libc::EBFONT -
ENOSTR = libc::ENOSTR -
ENODATA = libc::ENODATA -
ETIME = libc::ETIME -
ENOSR = libc::ENOSR -
ENONET = libc::ENONET -
ENOPKG = libc::ENOPKG -
EREMOTE = libc::EREMOTE -
ENOLINK = libc::ENOLINK -
EADV = libc::EADV -
ESRMNT = libc::ESRMNT -
ECOMM = libc::ECOMM -
EPROTO = libc::EPROTO -
EMULTIHOP = libc::EMULTIHOP -
EDOTDOT = libc::EDOTDOT -
EBADMSG = libc::EBADMSG -
EOVERFLOW = libc::EOVERFLOW -
ENOTUNIQ = libc::ENOTUNIQ -
EBADFD = libc::EBADFD -
EREMCHG = libc::EREMCHG -
ELIBACC = libc::ELIBACC -
ELIBBAD = libc::ELIBBAD -
ELIBSCN = libc::ELIBSCN -
ELIBMAX = libc::ELIBMAX -
ELIBEXEC = libc::ELIBEXEC -
EILSEQ = libc::EILSEQ -
ERESTART = libc::ERESTART -
ESTRPIPE = libc::ESTRPIPE -
EUSERS = libc::EUSERS -
ENOTSOCK = libc::ENOTSOCK -
EDESTADDRREQ = libc::EDESTADDRREQ -
EMSGSIZE = libc::EMSGSIZE -
EPROTOTYPE = libc::EPROTOTYPE -
ENOPROTOOPT = libc::ENOPROTOOPT -
EPROTONOSUPPORT = libc::EPROTONOSUPPORT -
ESOCKTNOSUPPORT = libc::ESOCKTNOSUPPORT -
EOPNOTSUPP = libc::EOPNOTSUPP -
EPFNOSUPPORT = libc::EPFNOSUPPORT -
EAFNOSUPPORT = libc::EAFNOSUPPORT -
EADDRINUSE = libc::EADDRINUSE -
EADDRNOTAVAIL = libc::EADDRNOTAVAIL -
ENETDOWN = libc::ENETDOWN -
ENETUNREACH = libc::ENETUNREACH -
ENETRESET = libc::ENETRESET -
ECONNABORTED = libc::ECONNABORTED -
ECONNRESET = libc::ECONNRESET -
ENOBUFS = libc::ENOBUFS -
EISCONN = libc::EISCONN -
ENOTCONN = libc::ENOTCONN -
ESHUTDOWN = libc::ESHUTDOWN -
ETOOMANYREFS = libc::ETOOMANYREFS -
ETIMEDOUT = libc::ETIMEDOUT -
ECONNREFUSED = libc::ECONNREFUSED -
EHOSTDOWN = libc::EHOSTDOWN -
EHOSTUNREACH = libc::EHOSTUNREACH -
EALREADY = libc::EALREADY -
EINPROGRESS = libc::EINPROGRESS -
ESTALE = libc::ESTALE -
EUCLEAN = libc::EUCLEAN -
ENOTNAM = libc::ENOTNAM -
ENAVAIL = libc::ENAVAIL -
EISNAM = libc::EISNAM -
EREMOTEIO = libc::EREMOTEIO -
EDQUOT = libc::EDQUOT -
ENOMEDIUM = libc::ENOMEDIUM -
EMEDIUMTYPE = libc::EMEDIUMTYPE -
ECANCELED = libc::ECANCELED -
ENOKEY = libc::ENOKEY -
EKEYEXPIRED = libc::EKEYEXPIRED -
EKEYREVOKED = libc::EKEYREVOKED -
EKEYREJECTED = libc::EKEYREJECTED -
EOWNERDEAD = libc::EOWNERDEAD -
ENOTRECOVERABLE = libc::ENOTRECOVERABLE -
ERFKILL = libc::ERFKILL -
EHWPOISON = libc::EHWPOISON
Implementations
impl Errno
fn last() -> SelfReturns the current value of errno
fn last_raw() -> i32Returns the current raw i32 value of errno
fn set(self)Sets the value of errno.
Example
use Errno; EIO.set; assert_eq!;fn set_raw(errno: i32)Sets the raw i32 value of errno.
const fn from_i32(err: i32) -> Errnoconst fn from_raw(err: i32) -> Errnofn desc(self) -> &'static strfn clear()Sets the platform-specific errno to no-error
use Errno; EIO.set; clear; let err = last; assert_ne!; assert_eq!;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-1is not the errno sentinel value.
impl Errno
const EWOULDBLOCK: Errno = Errno::EAGAIN;const EDEADLOCK: Errno = Errno::EDEADLK;const ENOTSUP: Errno = Errno::EOPNOTSUPP;
Trait Implementations
impl Clone for Errno
fn clone(&self) -> Self
impl Copy for Errno
impl Debug for Errno
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for Errno
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Errno
impl Error for Errno
impl PartialEq for Errno
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq for Errno
impl TryFrom<Error> for Errno
type Error = Error;fn try_from(ioerror: Error) -> Result<Self, Error>
Auto Trait Implementations
impl Freeze for Errno
impl RefUnwindSafe for Errno
impl Send for Errno
impl Sync for Errno
impl Unpin for Errno
impl UnsafeUnpin for Errno
impl UnwindSafe for Errno
Blanket Implementations
impl<T> Any for Errno
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Errno
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Errno
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Errno
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Errno
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Errno
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for Errno
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for Errno
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Errno
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Errno
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>