rustix::io

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 fn from_io_error(io_err: &Error) -> Option<Self>

Extract an Errno value from a std::io::Error.

This isn’t a From conversion because it’s expected to be relatively uncommon.

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) -> Self

Construct an Errno from a raw OS error number.

Source§

impl Errno

Source

pub const ACCESS: Self

EACCES

Source

pub const ADDRINUSE: Self

EADDRINUSE

Source

pub const ADDRNOTAVAIL: Self

EADDRNOTAVAIL

Source

pub const ADV: Self

EADV

Source

pub const AFNOSUPPORT: Self

EAFNOSUPPORT

Source

pub const AGAIN: Self

EAGAIN

Source

pub const ALREADY: Self

EALREADY

Source

pub const BADE: Self

EBADE

Source

pub const BADF: Self

EBADF

Source

pub const BADFD: Self

EBADFD

Source

pub const BADMSG: Self

EBADMSG

Source

pub const BADR: Self

EBADR

Source

pub const BADRQC: Self

EBADRQC

Source

pub const BADSLT: Self

EBADSLT

Source

pub const BFONT: Self

EBFONT

Source

pub const BUSY: Self

EBUSY

Source

pub const CANCELED: Self

ECANCELED

Source

pub const CHILD: Self

ECHILD

Source

pub const CHRNG: Self

ECHRNG

Source

pub const COMM: Self

ECOMM

Source

pub const CONNABORTED: Self

ECONNABORTED

Source

pub const CONNREFUSED: Self

ECONNREFUSED

Source

pub const CONNRESET: Self

ECONNRESET

Source

pub const DEADLK: Self

EDEADLK

Source

pub const DEADLOCK: Self

EDEADLOCK

Source

pub const DESTADDRREQ: Self

EDESTADDRREQ

Source

pub const DOM: Self

EDOM

Source

pub const DOTDOT: Self

EDOTDOT

Source

pub const DQUOT: Self

EDQUOT

Source

pub const EXIST: Self

EEXIST

Source

pub const FAULT: Self

EFAULT

Source

pub const FBIG: Self

EFBIG

Source

pub const HOSTDOWN: Self

EHOSTDOWN

Source

pub const HOSTUNREACH: Self

EHOSTUNREACH

Source

pub const HWPOISON: Self

EHWPOISON

Source

pub const IDRM: Self

EIDRM

Source

pub const ILSEQ: Self

EILSEQ

Source

pub const INPROGRESS: Self

EINPROGRESS

Source

pub const INTR: Self

EINTR.

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

Source

pub const INVAL: Self

EINVAL

Source

pub const IO: Self

EIO

Source

pub const ISCONN: Self

EISCONN

Source

pub const ISDIR: Self

EISDIR

Source

pub const ISNAM: Self

EISNAM

Source

pub const KEYEXPIRED: Self

EKEYEXPIRED

Source

pub const KEYREJECTED: Self

EKEYREJECTED

Source

pub const KEYREVOKED: Self

EKEYREVOKED

Source

pub const L2HLT: Self

EL2HLT

Source

pub const L2NSYNC: Self

EL2NSYNC

Source

pub const L3HLT: Self

EL3HLT

Source

pub const L3RST: Self

EL3RST

Source

pub const LIBACC: Self

ELIBACC

Source

pub const LIBBAD: Self

ELIBBAD

Source

pub const LIBEXEC: Self

ELIBEXEC

Source

pub const LIBMAX: Self

ELIBMAX

Source

pub const LIBSCN: Self

ELIBSCN

Source

pub const LNRNG: Self

ELNRNG

Source

pub const LOOP: Self

ELOOP

Source

pub const MEDIUMTYPE: Self

EMEDIUMTYPE

Source

pub const MFILE: Self

EMFILE

EMLINK

Source

pub const MSGSIZE: Self

EMSGSIZE

Source

pub const MULTIHOP: Self

EMULTIHOP

Source

pub const NAMETOOLONG: Self

ENAMETOOLONG

Source

pub const NAVAIL: Self

ENAVAIL

Source

pub const NETDOWN: Self

ENETDOWN

Source

pub const NETRESET: Self

ENETRESET

Source

pub const NETUNREACH: Self

ENETUNREACH

Source

pub const NFILE: Self

ENFILE

Source

pub const NOANO: Self

ENOANO

Source

pub const NOBUFS: Self

ENOBUFS

Source

pub const NOCSI: Self

ENOCSI

Source

pub const NODATA: Self

ENODATA

Source

pub const NODEV: Self

ENODEV

Source

pub const NOENT: Self

ENOENT

Source

pub const NOEXEC: Self

ENOEXEC

Source

pub const NOKEY: Self

ENOKEY

Source

pub const NOLCK: Self

ENOLCK

ENOLINK

Source

pub const NOMEDIUM: Self

ENOMEDIUM

Source

pub const NOMEM: Self

ENOMEM

Source

pub const NOMSG: Self

ENOMSG

Source

pub const NONET: Self

ENONET

Source

pub const NOPKG: Self

ENOPKG

Source

pub const NOPROTOOPT: Self

ENOPROTOOPT

Source

pub const NOSPC: Self

ENOSPC

Source

pub const NOSR: Self

ENOSR

Source

pub const NOSTR: Self

ENOSTR

Source

pub const NOSYS: Self

ENOSYS

Source

pub const NOTBLK: Self

ENOTBLK

Source

pub const NOTCONN: Self

ENOTCONN

Source

pub const NOTDIR: Self

ENOTDIR

Source

pub const NOTEMPTY: Self

ENOTEMPTY

Source

pub const NOTNAM: Self

ENOTNAM

Source

pub const NOTRECOVERABLE: Self

ENOTRECOVERABLE

Source

pub const NOTSOCK: Self

ENOTSOCK

Source

pub const NOTSUP: Self

ENOTSUP

Source

pub const NOTTY: Self

ENOTTY

Source

pub const NOTUNIQ: Self

ENOTUNIQ

Source

pub const NXIO: Self

ENXIO

Source

pub const OPNOTSUPP: Self

EOPNOTSUPP

Source

pub const OVERFLOW: Self

EOVERFLOW

Source

pub const OWNERDEAD: Self

EOWNERDEAD

Source

pub const PERM: Self

EPERM

Source

pub const PFNOSUPPORT: Self

EPFNOSUPPORT

Source

pub const PIPE: Self

EPIPE

Source

pub const PROTO: Self

EPROTO

Source

pub const PROTONOSUPPORT: Self

EPROTONOSUPPORT

Source

pub const PROTOTYPE: Self

EPROTOTYPE

Source

pub const RANGE: Self

ERANGE

Source

pub const REMCHG: Self

EREMCHG

Source

pub const REMOTE: Self

EREMOTE

Source

pub const REMOTEIO: Self

EREMOTEIO

Source

pub const RESTART: Self

ERESTART

Source

pub const RFKILL: Self

ERFKILL

Source

pub const ROFS: Self

EROFS

Source

pub const SHUTDOWN: Self

ESHUTDOWN

Source

pub const SOCKTNOSUPPORT: Self

ESOCKTNOSUPPORT

Source

pub const SPIPE: Self

ESPIPE

Source

pub const SRCH: Self

ESRCH

Source

pub const SRMNT: Self

ESRMNT

Source

pub const STALE: Self

ESTALE

Source

pub const STRPIPE: Self

ESTRPIPE

Source

pub const TIME: Self

ETIME

Source

pub const TIMEDOUT: Self

ETIMEDOUT

Source

pub const TOOBIG: Self

E2BIG

Source

pub const TOOMANYREFS: Self

ETOOMANYREFS

Source

pub const TXTBSY: Self

ETXTBSY

Source

pub const UCLEAN: Self

EUCLEAN

Source

pub const UNATCH: Self

EUNATCH

Source

pub const USERS: Self

EUSERS

Source

pub const WOULDBLOCK: Self

EWOULDBLOCK

Source

pub const XDEV: Self

EXDEV

Source

pub const XFULL: Self

EXFULL

Source§

impl Errno

Source

pub fn kind(self) -> ErrorKind

Shorthand for std::io::Error::from(self).kind().

Trait Implementations§

Source§

impl Clone for Errno

Source§

fn clone(&self) -> Errno

Returns a copy 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, fmt: &mut Formatter<'_>) -> Result

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

impl Display for Errno

Source§

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

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

impl Error for Errno

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Errno> for Error

Source§

fn from(err: Errno) -> Self

Converts to this type from the input type.
Source§

impl Hash for Errno

Source§

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

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.