Struct rustix::io::Errno

source ·
#[repr(transparent)]
pub struct Errno(_);
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

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.

Implementations§

source§

impl Errno

source

pub const ACCESS: Self = _

EACCES

source

pub const ADDRINUSE: Self = _

EADDRINUSE

source

pub const ADDRNOTAVAIL: Self = _

EADDRNOTAVAIL

source

pub const AFNOSUPPORT: Self = _

EAFNOSUPPORT

source

pub const AGAIN: Self = _

EAGAIN

source

pub const ALREADY: Self = _

EALREADY

source

pub const AUTH: Self = _

EAUTH

source

pub const BADF: Self = _

EBADF

source

pub const BADMSG: Self = _

EBADMSG

source

pub const BADRPC: Self = _

EBADRPC

source

pub const BUSY: Self = _

EBUSY

source

pub const CANCELED: Self = _

ECANCELED

source

pub const CHILD: Self = _

ECHILD

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 DESTADDRREQ: Self = _

EDESTADDRREQ

source

pub const DOM: Self = _

EDOM

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 FTYPE: Self = _

EFTYPE

source

pub const HOSTDOWN: Self = _

EHOSTDOWN

source

pub const HOSTUNREACH: Self = _

EHOSTUNREACH

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 LOOP: Self = _

ELOOP

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 NEEDAUTH: Self = _

ENEEDAUTH

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 NOATTR: Self = _

ENOATTR

source

pub const NOBUFS: Self = _

ENOBUFS

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 NOLCK: Self = _

ENOLCK

ENOLINK

source

pub const NOMEM: Self = _

ENOMEM

source

pub const NOMSG: Self = _

ENOMSG

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 NOTRECOVERABLE: Self = _

ENOTRECOVERABLE

source

pub const NOTSOCK: Self = _

ENOTSOCK

source

pub const NOTSUP: Self = _

ENOTSUP

source

pub const NOTTY: Self = _

ENOTTY

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 PROCLIM: Self = _

EPROCLIM

source

pub const PROCUNAVAIL: Self = _

EPROCUNAVAIL

source

pub const PROGMISMATCH: Self = _

EPROGMISMATCH

source

pub const PROGUNAVAIL: Self = _

EPROGUNAVAIL

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 REMOTE: Self = _

EREMOTE

source

pub const ROFS: Self = _

EROFS

source

pub const RPCMISMATCH: Self = _

ERPCMISMATCH

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 STALE: Self = _

ESTALE

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 USERS: Self = _

EUSERS

source

pub const WOULDBLOCK: Self = _

EWOULDBLOCK

source

pub const XDEV: Self = _

EXDEV

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 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, demand: &mut Demand<'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<Errno> 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 StructuralEq for Errno

source§

impl StructuralPartialEq for Errno

Auto Trait Implementations§

§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<E> Provider for Ewhere E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
source§

impl<T> ToOwned for Twhere 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 Twhere 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 Twhere 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 Twhere 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.