Struct Errno

Source
pub struct Errno(/* private fields */);
Expand description

errno—An error code.

The error type for rustix APIs. This is similar to [std::io::Error], but only holds an OS error code, and no extra error value.

§References

Implementations§

Source§

impl Errno

Source

pub const fn raw_os_error(self) -> i32

Extract the raw OS error number from this error.

Source

pub const fn from_raw_os_error(raw: i32) -> Errno

Construct an Errno from a raw OS error number.

Source§

impl Errno

Source

pub const ACCESS: Errno

EACCES

Source

pub const ADDRINUSE: Errno

EADDRINUSE

Source

pub const ADDRNOTAVAIL: Errno

EADDRNOTAVAIL

Source

pub const ADV: Errno

EADV

Source

pub const AFNOSUPPORT: Errno

EAFNOSUPPORT

Source

pub const AGAIN: Errno

EAGAIN

Source

pub const ALREADY: Errno

EALREADY

Source

pub const BADE: Errno

EBADE

Source

pub const BADF: Errno

EBADF

Source

pub const BADFD: Errno

EBADFD

Source

pub const BADMSG: Errno

EBADMSG

Source

pub const BADR: Errno

EBADR

Source

pub const BADRQC: Errno

EBADRQC

Source

pub const BADSLT: Errno

EBADSLT

Source

pub const BFONT: Errno

EBFONT

Source

pub const BUSY: Errno

EBUSY

Source

pub const CANCELED: Errno

ECANCELED

Source

pub const CHILD: Errno

ECHILD

Source

pub const CHRNG: Errno

ECHRNG

Source

pub const COMM: Errno

ECOMM

Source

pub const CONNABORTED: Errno

ECONNABORTED

Source

pub const CONNREFUSED: Errno

ECONNREFUSED

Source

pub const CONNRESET: Errno

ECONNRESET

Source

pub const DEADLK: Errno

EDEADLK

Source

pub const DEADLOCK: Errno

EDEADLOCK

Source

pub const DESTADDRREQ: Errno

EDESTADDRREQ

Source

pub const DOM: Errno

EDOM

Source

pub const DOTDOT: Errno

EDOTDOT

Source

pub const DQUOT: Errno

EDQUOT

Source

pub const EXIST: Errno

EEXIST

Source

pub const FAULT: Errno

EFAULT

Source

pub const FBIG: Errno

EFBIG

Source

pub const HOSTDOWN: Errno

EHOSTDOWN

Source

pub const HOSTUNREACH: Errno

EHOSTUNREACH

Source

pub const HWPOISON: Errno

EHWPOISON

Source

pub const IDRM: Errno

EIDRM

Source

pub const ILSEQ: Errno

EILSEQ

Source

pub const INPROGRESS: Errno

EINPROGRESS

Source

pub const INTR: Errno

EINTR

For a convenient way to retry system calls that exit with INTR, use retry_on_intr.

Source

pub const INVAL: Errno

EINVAL

Source

pub const IO: Errno

EIO

Source

pub const ISCONN: Errno

EISCONN

Source

pub const ISDIR: Errno

EISDIR

Source

pub const ISNAM: Errno

EISNAM

Source

pub const KEYEXPIRED: Errno

EKEYEXPIRED

Source

pub const KEYREJECTED: Errno

EKEYREJECTED

Source

pub const KEYREVOKED: Errno

EKEYREVOKED

Source

pub const L2HLT: Errno

EL2HLT

Source

pub const L2NSYNC: Errno

EL2NSYNC

Source

pub const L3HLT: Errno

EL3HLT

Source

pub const L3RST: Errno

EL3RST

Source

pub const LIBACC: Errno

ELIBACC

Source

pub const LIBBAD: Errno

ELIBBAD

Source

pub const LIBEXEC: Errno

ELIBEXEC

Source

pub const LIBMAX: Errno

ELIBMAX

Source

pub const LIBSCN: Errno

ELIBSCN

Source

pub const LNRNG: Errno

ELNRNG

Source

pub const LOOP: Errno

ELOOP

Source

pub const MEDIUMTYPE: Errno

EMEDIUMTYPE

Source

pub const MFILE: Errno

EMFILE

EMLINK

Source

pub const MSGSIZE: Errno

EMSGSIZE

Source

pub const MULTIHOP: Errno

EMULTIHOP

Source

pub const NAMETOOLONG: Errno

ENAMETOOLONG

Source

pub const NAVAIL: Errno

ENAVAIL

Source

pub const NETDOWN: Errno

ENETDOWN

Source

pub const NETRESET: Errno

ENETRESET

Source

pub const NETUNREACH: Errno

ENETUNREACH

Source

pub const NFILE: Errno

ENFILE

Source

pub const NOANO: Errno

ENOANO

Source

pub const NOBUFS: Errno

ENOBUFS

Source

pub const NOCSI: Errno

ENOCSI

Source

pub const NODATA: Errno

ENODATA

Source

pub const NODEV: Errno

ENODEV

Source

pub const NOENT: Errno

ENOENT

Source

pub const NOEXEC: Errno

ENOEXEC

Source

pub const NOKEY: Errno

ENOKEY

Source

pub const NOLCK: Errno

ENOLCK

ENOLINK

Source

pub const NOMEDIUM: Errno

ENOMEDIUM

Source

pub const NOMEM: Errno

ENOMEM

Source

pub const NOMSG: Errno

ENOMSG

Source

pub const NONET: Errno

ENONET

Source

pub const NOPKG: Errno

ENOPKG

Source

pub const NOPROTOOPT: Errno

ENOPROTOOPT

Source

pub const NOSPC: Errno

ENOSPC

Source

pub const NOSR: Errno

ENOSR

Source

pub const NOSTR: Errno

ENOSTR

Source

pub const NOSYS: Errno

ENOSYS

Source

pub const NOTBLK: Errno

ENOTBLK

Source

pub const NOTCONN: Errno

ENOTCONN

Source

pub const NOTDIR: Errno

ENOTDIR

Source

pub const NOTEMPTY: Errno

ENOTEMPTY

Source

pub const NOTNAM: Errno

ENOTNAM

Source

pub const NOTRECOVERABLE: Errno

ENOTRECOVERABLE

Source

pub const NOTSOCK: Errno

ENOTSOCK

Source

pub const NOTSUP: Errno

ENOTSUP

Source

pub const NOTTY: Errno

ENOTTY

Source

pub const NOTUNIQ: Errno

ENOTUNIQ

Source

pub const NXIO: Errno

ENXIO

Source

pub const OPNOTSUPP: Errno

EOPNOTSUPP

Source

pub const OVERFLOW: Errno

EOVERFLOW

Source

pub const OWNERDEAD: Errno

EOWNERDEAD

Source

pub const PERM: Errno

EPERM

Source

pub const PFNOSUPPORT: Errno

EPFNOSUPPORT

Source

pub const PIPE: Errno

EPIPE

Source

pub const PROTO: Errno

EPROTO

Source

pub const PROTONOSUPPORT: Errno

EPROTONOSUPPORT

Source

pub const PROTOTYPE: Errno

EPROTOTYPE

Source

pub const RANGE: Errno

ERANGE

Source

pub const REMCHG: Errno

EREMCHG

Source

pub const REMOTE: Errno

EREMOTE

Source

pub const REMOTEIO: Errno

EREMOTEIO

Source

pub const RESTART: Errno

ERESTART

Source

pub const RFKILL: Errno

ERFKILL

Source

pub const ROFS: Errno

EROFS

Source

pub const SHUTDOWN: Errno

ESHUTDOWN

Source

pub const SOCKTNOSUPPORT: Errno

ESOCKTNOSUPPORT

Source

pub const SPIPE: Errno

ESPIPE

Source

pub const SRCH: Errno

ESRCH

Source

pub const SRMNT: Errno

ESRMNT

Source

pub const STALE: Errno

ESTALE

Source

pub const STRPIPE: Errno

ESTRPIPE

Source

pub const TIME: Errno

ETIME

Source

pub const TIMEDOUT: Errno

ETIMEDOUT

Source

pub const TOOBIG: Errno

E2BIG

Source

pub const TOOMANYREFS: Errno

ETOOMANYREFS

Source

pub const TXTBSY: Errno

ETXTBSY

Source

pub const UCLEAN: Errno

EUCLEAN

Source

pub const UNATCH: Errno

EUNATCH

Source

pub const USERS: Errno

EUSERS

Source

pub const WOULDBLOCK: Errno

EWOULDBLOCK

Source

pub const XDEV: Errno

EXDEV

Source

pub const XFULL: Errno

EXFULL

Trait Implementations§

Source§

impl Clone for Errno

Source§

fn clone(&self) -> Errno

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Errno

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Errno

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Hash for Errno

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Errno

Source§

fn eq(&self, other: &Errno) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Errno

Source§

impl Eq for Errno

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.