Skip to main content

Errno

Enum Errno 

Source
#[repr(i32)]
pub enum Errno {
Show 79 variants EPERM = 1, ENOENT = 2, ESRCH = 3, EINTR = 4, EIO = 5, ENXIO = 6, E2BIG = 7, ENOEXEC = 8, EBADF = 9, ECHILD = 10, EAGAIN = 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, ENOMSG = 35, EDEADLK = 45, ENOLCK = 46, ENOSTR = 60, ENODATA = 61, ETIME = 62, ENOSR = 63, EPROTO = 71, EBADMSG = 77, ENOSYS = 88, ENOTEMPTY = 90, ENAMETOOLONG = 91, ELOOP = 92, EOPNOTSUPP = 95, EPFNOSUPPORT = 96, ECONNRESET = 104, ENOBUFS = 105, EAFNOSUPPORT = 106, EPROTOTYPE = 107, ENOTSOCK = 108, ENOPROTOOPT = 109, ESHUTDOWN = 110, ECONNREFUSED = 111, EADDRINUSE = 112, ECONNABORTED = 113, ENETUNREACH = 114, ENETDOWN = 115, ETIMEDOUT = 116, EHOSTDOWN = 117, EHOSTUNREACH = 118, EINPROGRESS = 119, EALREADY = 120, EDESTADDRREQ = 121, EMSGSIZE = 122, EPROTONOSUPPORT = 123, ESOCKTNOSUPPORT = 124, EADDRNOTAVAIL = 125, ENETRESET = 126, EISCONN = 127, ENOTCONN = 128, ETOOMANYREFS = 129, ENOTSUP = 134, EILSEQ = 138, EOVERFLOW = 139, ECANCELED = 140,
}
Expand description

See errno.h.

Variants§

§

EPERM = 1

Not owner

§

ENOENT = 2

No such file or directory

§

ESRCH = 3

No such context

§

EINTR = 4

Interrupted system call

§

EIO = 5

I/O error

§

ENXIO = 6

No such device or address

§

E2BIG = 7

Arg list too long

§

ENOEXEC = 8

Exec format error

§

EBADF = 9

Bad file number

§

ECHILD = 10

No children

§

EAGAIN = 11

No more contexts

§

ENOMEM = 12

Not enough core

§

EACCES = 13

Permission denied

§

EFAULT = 14

Bad address

§

ENOTBLK = 15

Block device required

§

EBUSY = 16

Mount device busy

§

EEXIST = 17

File exists

§

EXDEV = 18

Cross-device link

§

ENODEV = 19

No such device

§

ENOTDIR = 20

Not a directory

§

EISDIR = 21

Is a directory

§

EINVAL = 22

Invalid argument

§

ENFILE = 23

File table overflow

§

EMFILE = 24

Too many open files

§

ENOTTY = 25

Not a typewriter

§

ETXTBSY = 26

Text file busy

§

EFBIG = 27

File too large

§

ENOSPC = 28

No space left on device

§

ESPIPE = 29

Illegal seek

§

EROFS = 30

Read-only file system

Too many links

§

EPIPE = 32

Broken pipe

§

EDOM = 33

Argument too large

§

ERANGE = 34

Result too large

§

ENOMSG = 35

Unexpected message type

§

EDEADLK = 45

Resource deadlock avoided

§

ENOLCK = 46

No locks available

§

ENOSTR = 60

STREAMS device required

§

ENODATA = 61

Missing expected message data

§

ETIME = 62

STREAMS timeout occurred

§

ENOSR = 63

Insufficient memory

§

EPROTO = 71

Generic STREAMS error

§

EBADMSG = 77

Invalid STREAMS message

§

ENOSYS = 88

Function not implemented

§

ENOTEMPTY = 90

Directory not empty

§

ENAMETOOLONG = 91

File name too long

§

ELOOP = 92

Too many levels of symbolic links

§

EOPNOTSUPP = 95

Operation not supported on socket

§

EPFNOSUPPORT = 96

Protocol family not supported

§

ECONNRESET = 104

Connection reset by peer

§

ENOBUFS = 105

No buffer space available

§

EAFNOSUPPORT = 106

Addr family not supported

§

EPROTOTYPE = 107

Protocol wrong type for socket

§

ENOTSOCK = 108

Socket operation on non-socket

§

ENOPROTOOPT = 109

Protocol not available

§

ESHUTDOWN = 110

Can’t send after socket shutdown

§

ECONNREFUSED = 111

Connection refused

§

EADDRINUSE = 112

Address already in use

§

ECONNABORTED = 113

Software caused connection abort

§

ENETUNREACH = 114

Network is unreachable

§

ENETDOWN = 115

Network is down

§

ETIMEDOUT = 116

Connection timed out

§

EHOSTDOWN = 117

Host is down

§

EHOSTUNREACH = 118

No route to host

§

EINPROGRESS = 119

Operation now in progress

§

EALREADY = 120

Operation already in progress

§

EDESTADDRREQ = 121

Destination address required

§

EMSGSIZE = 122

Message size

§

EPROTONOSUPPORT = 123

Protocol not supported

§

ESOCKTNOSUPPORT = 124

Socket type not supported

§

EADDRNOTAVAIL = 125

Can’t assign requested address

§

ENETRESET = 126

Network dropped connection on reset

§

EISCONN = 127

Socket is already connected

§

ENOTCONN = 128

Socket is not connected

§

ETOOMANYREFS = 129

Too many references: can’t splice

§

ENOTSUP = 134

Unsupported value

§

EILSEQ = 138

Illegal byte sequence

§

EOVERFLOW = 139

Value overflow

§

ECANCELED = 140

Operation canceled

Implementations§

Source§

impl Errno

Source

pub const fn from_repr(discriminant: i32) -> Option<Errno>

Try to create Self from the raw representation

Source§

impl Errno

Source

pub fn errno_to_string(err: i32) -> String

Converts a raw errno error code to a string

Trait Implementations§

Source§

impl Clone for Errno

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Errno

Source§

impl Debug for Errno

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

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 Eq for Errno

Source§

impl PartialEq for Errno

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
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 UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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 #126799)
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> Is for T
where T: ?Sized,

Source§

type EqTo = T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.