Struct rustix::io::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)>

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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> 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,

§

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§

default 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>,

§

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>,

§

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.