Enum errno

Source
#[non_exhaustive]
#[repr(u16)]
pub enum errno {
Show 77 variants SUCCESS = 0, TOOBIG = 1, ACCES = 2, ADDRINUSE = 3, ADDRNOTAVAIL = 4, AFNOSUPPORT = 5, AGAIN = 6, ALREADY = 7, BADF = 8, BADMSG = 9, BUSY = 10, CANCELED = 11, CHILD = 12, CONNABORTED = 13, CONNREFUSED = 14, CONNRESET = 15, DEADLK = 16, DESTADDRREQ = 17, DOM = 18, DQUOT = 19, EXIST = 20, FAULT = 21, FBIG = 22, HOSTUNREACH = 23, IDRM = 24, ILSEQ = 25, INPROGRESS = 26, INTR = 27, INVAL = 28, IO = 29, ISCONN = 30, ISDIR = 31, LOOP = 32, MFILE = 33, MLINK = 34, MSGSIZE = 35, MULTIHOP = 36, NAMETOOLONG = 37, NETDOWN = 38, NETRESET = 39, NETUNREACH = 40, NFILE = 41, NOBUFS = 42, NODEV = 43, NOENT = 44, NOEXEC = 45, NOLCK = 46, NOLINK = 47, NOMEM = 48, NOMSG = 49, NOPROTOOPT = 50, NOSPC = 51, NOSYS = 52, NOTCONN = 53, NOTDIR = 54, NOTEMPTY = 55, NOTRECOVERABLE = 56, NOTSOCK = 57, NOTSUP = 58, NOTTY = 59, NXIO = 60, OVERFLOW = 61, OWNERDEAD = 62, PERM = 63, PIPE = 64, PROTO = 65, PROTONOSUPPORT = 66, PROTOTYPE = 67, RANGE = 68, ROFS = 69, SPIPE = 70, SRCH = 71, STALE = 72, TIMEDOUT = 73, TXTBSY = 74, XDEV = 75, NOTCAPABLE = 76,
}
Expand description

Error codes returned by system calls.

Not all of these error codes are returned by the system calls provided by this environment, but are either used in userspace exclusively or merely provided for alignment with POSIX.

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.
§

SUCCESS = 0

No error occurred. System call completed successfully.

§

TOOBIG = 1

Argument list too long.

§

ACCES = 2

Permission denied.

§

ADDRINUSE = 3

Address in use.

§

ADDRNOTAVAIL = 4

Address not available.

§

AFNOSUPPORT = 5

Address family not supported.

§

AGAIN = 6

Resource unavailable, or operation would block.

§

ALREADY = 7

Connection already in progress.

§

BADF = 8

Bad file descriptor.

§

BADMSG = 9

Bad message.

§

BUSY = 10

Device or resource busy.

§

CANCELED = 11

Operation canceled.

§

CHILD = 12

No child processes.

§

CONNABORTED = 13

Connection aborted.

§

CONNREFUSED = 14

Connection refused.

§

CONNRESET = 15

Connection reset.

§

DEADLK = 16

Resource deadlock would occur.

§

DESTADDRREQ = 17

Destination address required.

§

DOM = 18

Mathematics argument out of domain of function.

§

DQUOT = 19

Reserved.

§

EXIST = 20

File exists.

§

FAULT = 21

Bad address.

§

FBIG = 22

File too large.

§

HOSTUNREACH = 23

Host is unreachable.

§

IDRM = 24

Identifier removed.

§

ILSEQ = 25

Illegal byte sequence.

§

INPROGRESS = 26

Operation in progress.

§

INTR = 27

Interrupted function.

§

INVAL = 28

Invalid argument.

§

IO = 29

I/O error.

§

ISCONN = 30

Socket is connected.

§

ISDIR = 31

Is a directory.

§

LOOP = 32

Too many levels of symbolic links.

§

MFILE = 33

File descriptor value too large.

Too many links.

§

MSGSIZE = 35

Message too large.

§

MULTIHOP = 36

Reserved.

§

NAMETOOLONG = 37

Filename too long.

§

NETDOWN = 38

Network is down.

§

NETRESET = 39

Connection aborted by network.

§

NETUNREACH = 40

Network unreachable.

§

NFILE = 41

Too many files open in system.

§

NOBUFS = 42

No buffer space available.

§

NODEV = 43

No such device.

§

NOENT = 44

No such file or directory.

§

NOEXEC = 45

Executable file format error.

§

NOLCK = 46

No locks available.

Reserved.

§

NOMEM = 48

Not enough space.

§

NOMSG = 49

No message of the desired type.

§

NOPROTOOPT = 50

Protocol not available.

§

NOSPC = 51

No space left on device.

§

NOSYS = 52

Function not supported.

§

NOTCONN = 53

The socket is not connected.

§

NOTDIR = 54

Not a directory or a symbolic link to a directory.

§

NOTEMPTY = 55

Directory not empty.

§

NOTRECOVERABLE = 56

State not recoverable.

§

NOTSOCK = 57

Not a socket.

§

NOTSUP = 58

Not supported, or operation not supported on socket.

§

NOTTY = 59

Inappropriate I/O control operation.

§

NXIO = 60

No such device or address.

§

OVERFLOW = 61

Value too large to be stored in data type.

§

OWNERDEAD = 62

Previous owner died.

§

PERM = 63

Operation not permitted.

§

PIPE = 64

Broken pipe.

§

PROTO = 65

Protocol error.

§

PROTONOSUPPORT = 66

Protocol not supported.

§

PROTOTYPE = 67

Protocol wrong type for socket.

§

RANGE = 68

Result too large.

§

ROFS = 69

Read-only file system.

§

SPIPE = 70

Invalid seek.

§

SRCH = 71

No such process.

§

STALE = 72

Reserved.

§

TIMEDOUT = 73

Connection timed out.

§

TXTBSY = 74

Text file busy.

§

XDEV = 75

Cross-device link.

§

NOTCAPABLE = 76

Extension: Capabilities insufficient.

Trait Implementations§

Source§

impl Clone for errno

Source§

fn clone(&self) -> errno

Returns a duplicate 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

Formats the value using the given formatter. Read more
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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, 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.