Enum mio_aio::Errno

source ·
#[non_exhaustive]
#[repr(i32)]
pub enum Errno {
Show 97 variants UnknownErrno = 0, EPERM = 1, ENOENT = 2, ESRCH = 3, EINTR = 4, EIO = 5, ENXIO = 6, E2BIG = 7, ENOEXEC = 8, EBADF = 9, ECHILD = 10, EDEADLK = 11, ENOMEM = 12, EACCES = 13, EFAULT = 14, ENOTBLK = 15, EBUSY = 16, EEXIST = 17, EXDEV = 18, ENODEV = 19, ENOTDIR = 20, EISDIR = 21, EINVAL = 22, ENFILE = 23, EMFILE = 24, ENOTTY = 25, ETXTBSY = 26, EFBIG = 27, ENOSPC = 28, ESPIPE = 29, EROFS = 30, EMLINK = 31, EPIPE = 32, EDOM = 33, ERANGE = 34, EAGAIN = 35, EINPROGRESS = 36, EALREADY = 37, ENOTSOCK = 38, EDESTADDRREQ = 39, EMSGSIZE = 40, EPROTOTYPE = 41, ENOPROTOOPT = 42, EPROTONOSUPPORT = 43, ESOCKTNOSUPPORT = 44, ENOTSUP = 45, EPFNOSUPPORT = 46, EAFNOSUPPORT = 47, EADDRINUSE = 48, EADDRNOTAVAIL = 49, ENETDOWN = 50, ENETUNREACH = 51, ENETRESET = 52, ECONNABORTED = 53, ECONNRESET = 54, ENOBUFS = 55, EISCONN = 56, ENOTCONN = 57, ESHUTDOWN = 58, ETOOMANYREFS = 59, ETIMEDOUT = 60, ECONNREFUSED = 61, ELOOP = 62, ENAMETOOLONG = 63, EHOSTDOWN = 64, EHOSTUNREACH = 65, ENOTEMPTY = 66, EPROCLIM = 67, EUSERS = 68, EDQUOT = 69, ESTALE = 70, EREMOTE = 71, EBADRPC = 72, ERPCMISMATCH = 73, EPROGUNAVAIL = 74, EPROGMISMATCH = 75, EPROCUNAVAIL = 76, ENOLCK = 77, ENOSYS = 78, EFTYPE = 79, EAUTH = 80, ENEEDAUTH = 81, EIDRM = 82, ENOMSG = 83, EOVERFLOW = 84, ECANCELED = 85, EILSEQ = 86, ENOATTR = 87, EDOOFUS = 88, EBADMSG = 89, EMULTIHOP = 90, ENOLINK = 91, EPROTO = 92, ENOTCAPABLE = 93, ECAPMODE = 94, ENOTRECOVERABLE = 95, EOWNERDEAD = 96,
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnknownErrno = 0

§

EPERM = 1

§

ENOENT = 2

§

ESRCH = 3

§

EINTR = 4

§

EIO = 5

§

ENXIO = 6

§

E2BIG = 7

§

ENOEXEC = 8

§

EBADF = 9

§

ECHILD = 10

§

EDEADLK = 11

§

ENOMEM = 12

§

EACCES = 13

§

EFAULT = 14

§

ENOTBLK = 15

§

EBUSY = 16

§

EEXIST = 17

§

EXDEV = 18

§

ENODEV = 19

§

ENOTDIR = 20

§

EISDIR = 21

§

EINVAL = 22

§

ENFILE = 23

§

EMFILE = 24

§

ENOTTY = 25

§

ETXTBSY = 26

§

EFBIG = 27

§

ENOSPC = 28

§

ESPIPE = 29

§

EROFS = 30

§

EPIPE = 32

§

EDOM = 33

§

ERANGE = 34

§

EAGAIN = 35

§

EINPROGRESS = 36

§

EALREADY = 37

§

ENOTSOCK = 38

§

EDESTADDRREQ = 39

§

EMSGSIZE = 40

§

EPROTOTYPE = 41

§

ENOPROTOOPT = 42

§

EPROTONOSUPPORT = 43

§

ESOCKTNOSUPPORT = 44

§

ENOTSUP = 45

§

EPFNOSUPPORT = 46

§

EAFNOSUPPORT = 47

§

EADDRINUSE = 48

§

EADDRNOTAVAIL = 49

§

ENETDOWN = 50

§

ENETUNREACH = 51

§

ENETRESET = 52

§

ECONNABORTED = 53

§

ECONNRESET = 54

§

ENOBUFS = 55

§

EISCONN = 56

§

ENOTCONN = 57

§

ESHUTDOWN = 58

§

ETOOMANYREFS = 59

§

ETIMEDOUT = 60

§

ECONNREFUSED = 61

§

ELOOP = 62

§

ENAMETOOLONG = 63

§

EHOSTDOWN = 64

§

EHOSTUNREACH = 65

§

ENOTEMPTY = 66

§

EPROCLIM = 67

§

EUSERS = 68

§

EDQUOT = 69

§

ESTALE = 70

§

EREMOTE = 71

§

EBADRPC = 72

§

ERPCMISMATCH = 73

§

EPROGUNAVAIL = 74

§

EPROGMISMATCH = 75

§

EPROCUNAVAIL = 76

§

ENOLCK = 77

§

ENOSYS = 78

§

EFTYPE = 79

§

EAUTH = 80

§

ENEEDAUTH = 81

§

EIDRM = 82

§

ENOMSG = 83

§

EOVERFLOW = 84

§

ECANCELED = 85

§

EILSEQ = 86

§

ENOATTR = 87

§

EDOOFUS = 88

§

EBADMSG = 89

§

EMULTIHOP = 90

§

EPROTO = 92

§

ENOTCAPABLE = 93

§

ECAPMODE = 94

§

ENOTRECOVERABLE = 95

§

EOWNERDEAD = 96

Implementations§

source§

impl Errno

source

pub fn last() -> Errno

Returns the current value of errno

source

pub fn last_raw() -> i32

Returns the current raw i32 value of errno

source

pub fn set(self)

Sets the value of errno.

§Example
use nix::errno::Errno;

Errno::EIO.set();

assert_eq!(Errno::last(), Errno::EIO);
source

pub fn set_raw(errno: i32)

Sets the raw i32 value of errno.

source

pub const fn from_i32(err: i32) -> Errno

👎Deprecated since 0.28.0: please use Errno::from_raw() instead
source

pub const fn from_raw(err: i32) -> Errno

source

pub fn desc(self) -> &'static str

source

pub fn clear()

Sets the platform-specific errno to no-error

use nix::errno::Errno;

Errno::EIO.set();

Errno::clear();

let err = Errno::last();
assert_ne!(err, Errno::EIO);
assert_eq!(err, Errno::from_raw(0));
source

pub fn result<S>(value: S) -> Result<S, Errno>

Returns Ok(value) if it does not contain the sentinel value. This should not be used when -1 is not the errno sentinel value.

source§

impl Errno

source

pub const ELAST: Errno = Errno::EOWNERDEAD

source

pub const EWOULDBLOCK: Errno = Errno::EAGAIN

source

pub const EDEADLOCK: Errno = Errno::EDEADLK

source

pub const EOPNOTSUPP: Errno = Errno::ENOTSUP

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, 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 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 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 TryFrom<Error> for Errno

§

type Error = Error

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

fn try_from(ioerror: Error) -> Result<Errno, Error>

Performs the conversion.
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.