ErrNo

Enum ErrNo 

Source
#[non_exhaustive]
#[repr(u16)]
pub enum ErrNo {
Show 77 variants Success = 0, TooBig = 1, Access = 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, Domain = 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, NoLock = 46, NoLink = 47, NoMem = 48, NoMsg = 49, NoProtoOpt = 50, NoSpace = 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 functions.

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.

§

Access = 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.

§

Domain = 18

Mathematics argument out of domain of function.

§

DQuot = 19

Reserved. (Quota exceeded.)

§

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. (Multihop attempted.)

§

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.

§

NoLock = 46

No locks available.

Reserved. (Link has been severed.)

§

NoMem = 48

Not enough space.

§

NoMsg = 49

No message of the desired type.

§

NoProtoOpt = 50

Protocol not available.

§

NoSpace = 51

No space left on device.

§

NoSys = 52

Function not supported. (Always unsupported.)

§

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. (Transient unsupported.)

§

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. (Stale file handle.)

§

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 From<Error> for ErrNo

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
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 TryFrom<u16> for ErrNo

Source§

type Error = ()

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

fn try_from(prim: u16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u8> for ErrNo

Source§

type Error = ()

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

fn try_from(prim: u8) -> Result<Self, Self::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> 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> ToOwned for T
where T: Clone,

Source§

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