Struct rustix::io::Errno

source · []
#[repr(transparent)]
pub struct Errno(_);
Expand description

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

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

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

Extract the raw OS error number from this error.

Construct an Errno from a raw OS error number.

EACCES

EADDRINUSE

EADDRNOTAVAIL

EADV

EAFNOSUPPORT

EAGAIN

EALREADY

EBADE

EBADF

EBADFD

EBADMSG

EBADR

EBADRQC

EBADSLT

EBFONT

EBUSY

ECANCELED

ECHILD

ECHRNG

ECOMM

ECONNABORTED

ECONNREFUSED

ECONNRESET

EDEADLK

EDEADLOCK

EDESTADDRREQ

EDOM

EDOTDOT

EDQUOT

EEXIST

EFAULT

EFBIG

EHOSTDOWN

EHOSTUNREACH

EHWPOISON

EIDRM

EILSEQ

EINPROGRESS

EINTR.

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

EINVAL

EIO

EISCONN

EISDIR

EISNAM

EKEYEXPIRED

EKEYREJECTED

EKEYREVOKED

EL2HLT

EL2NSYNC

EL3HLT

EL3RST

ELIBACC

ELIBBAD

ELIBEXEC

ELIBMAX

ELIBSCN

ELNRNG

ELOOP

EMEDIUMTYPE

EMFILE

EMLINK

EMSGSIZE

EMULTIHOP

ENAMETOOLONG

ENAVAIL

ENETDOWN

ENETRESET

ENETUNREACH

ENFILE

ENOANO

ENOBUFS

ENOCSI

ENODATA

ENODEV

ENOENT

ENOEXEC

ENOKEY

ENOLCK

ENOLINK

ENOMEDIUM

ENOMEM

ENOMSG

ENONET

ENOPKG

ENOPROTOOPT

ENOSPC

ENOSR

ENOSTR

ENOSYS

ENOTBLK

ENOTCONN

ENOTDIR

ENOTEMPTY

ENOTNAM

ENOTRECOVERABLE

ENOTSOCK

ENOTSUP

ENOTTY

ENOTUNIQ

ENXIO

EOPNOTSUPP

EOVERFLOW

EOWNERDEAD

EPERM

EPFNOSUPPORT

EPIPE

EPROTO

EPROTONOSUPPORT

EPROTOTYPE

ERANGE

EREMCHG

EREMOTE

EREMOTEIO

ERESTART

ERFKILL

EROFS

ESHUTDOWN

ESOCKTNOSUPPORT

ESPIPE

ESRCH

ESRMNT

ESTALE

ESTRPIPE

ETIME

ETIMEDOUT

E2BIG

ETOOMANYREFS

ETXTBSY

EUCLEAN

EUNATCH

EUSERS

EWOULDBLOCK

EXDEV

EXFULL

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.