Enum posix_errno::Error

source ·
#[non_exhaustive]
pub enum Error {
Show 81 variants E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EALREADY, EBADF, EBADMSG, EBUSY, ECANCELED, ECHILD, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDEADLK, EDESTADDRREQ, EDOM, EDQUOT, EEXIST, EFAULT, EFBIG, EHOSTUNREACH, EIDRM, EILSEQ, EINPROGRESS, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, EMFILE, EMLINK, EMSGSIZE, EMULTIHOP, ENAMETOOLONG, ENETDOWN, ENETRESET, ENETUNREACH, ENFILE, ENOBUFS, ENODATA, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG, ENOPROTOOPT, ENOSPC, ENOSR, ENOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTRECOVERABLE, ENOTSOCK, ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP, EOVERFLOW, EOWNERDEAD, EPERM, EPIPE, EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, ESTALE, ETIME, ETIMEDOUT, ETXTBSY, EWOULDBLOCK, EXDEV,
}
Expand description

Symbolic constants for error numbers defined in the POSIX standard.

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

E2BIG

Argument list too long.

§

EACCES

Permission denied.

§

EADDRINUSE

Address in use.

§

EADDRNOTAVAIL

Address not available.

§

EAFNOSUPPORT

Address family not supported.

§

EAGAIN

Resource unavailable, try again.

§

EALREADY

Connection already in progress.

§

EBADF

Bad file descriptor.

§

EBADMSG

Bad message.

§

EBUSY

Device or resource busy.

§

ECANCELED

Operation canceled.

§

ECHILD

No child processes.

§

ECONNABORTED

Connection aborted.

§

ECONNREFUSED

Connection refused.

§

ECONNRESET

Connection reset.

§

EDEADLK

Resource deadlock would occur.

§

EDESTADDRREQ

Destination address required.

§

EDOM

Mathematics argument out of domain of function.

§

EDQUOT

Reserved.

§

EEXIST

File exists.

§

EFAULT

Bad address.

§

EFBIG

File too large.

§

EHOSTUNREACH

Host is unreachable.

§

EIDRM

Identifier removed.

§

EILSEQ

Illegal byte sequence.

§

EINPROGRESS

Operation in progress.

§

EINTR

Interrupted function.

§

EINVAL

Invalid argument.

§

EIO

I/O error.

§

EISCONN

Socket is connected.

§

EISDIR

Is a directory.

§

ELOOP

Too many levels of symbolic links.

§

EMFILE

File descriptor value too large.

Too many links.

§

EMSGSIZE

Message too large.

§

EMULTIHOP

Reserved.

§

ENAMETOOLONG

Filename too long.

§

ENETDOWN

Network is down.

§

ENETRESET

Connection aborted by network.

§

ENETUNREACH

Network unreachable.

§

ENFILE

Too many files open in system.

§

ENOBUFS

No buffer space available.

§

ENODATA

No message is available on the STREAM head read queue.

§

ENODEV

No such device.

§

ENOENT

No such file or directory.

§

ENOEXEC

Executable file format error.

§

ENOLCK

No locks available.

Reserved.

§

ENOMEM

Not enough space.

§

ENOMSG

No message of the desired type.

§

ENOPROTOOPT

Protocol not available.

§

ENOSPC

No space left on device.

§

ENOSR

No STREAM resources.

§

ENOSTR

Not a STREAM.

§

ENOSYS

Functionality not supported.

§

ENOTCONN

The socket is not connected.

§

ENOTDIR

Not a directory or a symbolic link to a directory.

§

ENOTEMPTY

Directory not empty.

§

ENOTRECOVERABLE

State not recoverable.

§

ENOTSOCK

Not a socket.

§

ENOTSUP

Not supported.

§

ENOTTY

Inappropriate I/O control operation.

§

ENXIO

No such device or address.

§

EOPNOTSUPP

Operation not supported on socket.

§

EOVERFLOW

Value too large to be stored in data type.

§

EOWNERDEAD

Previous owner died.

§

EPERM

Operation not permitted.

§

EPIPE

Broken pipe.

§

EPROTO

Protocol error.

§

EPROTONOSUPPORT

Protocol not supported.

§

EPROTOTYPE

Protocol wrong type for socket.

§

ERANGE

Result too large.

§

EROFS

Read-only file system.

§

ESPIPE

Invalid seek.

§

ESRCH

No such process.

§

ESTALE

Reserved.

§

ETIME

Stream ioctl() timeout.

§

ETIMEDOUT

Connection timed out.

§

ETXTBSY

Text file busy.

§

EWOULDBLOCK

Operation would block.

§

EXDEV

Cross-device link.

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

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 Error

source§

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

Formats the value using the given formatter. Read more
source§

impl Hash for Error

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 Ord for Error

source§

fn cmp(&self, other: &Error) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Error

source§

fn eq(&self, other: &Error) -> 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 PartialOrd for Error

source§

fn partial_cmp(&self, other: &Error) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Error

source§

impl Eq for Error

source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

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, dst: *mut T)

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