Struct Errno

Source
pub struct Errno(/* private fields */);

Implementations§

Source§

impl Errno

Source

pub const EINVAL: Self

Source

pub const EDEADLK: Self

Source

pub const ENAMETOOLONG: Self

Source

pub const ENOLCK: Self

Source

pub const ENOSYS: Self

Source

pub const ENOTEMPTY: Self

Source

pub const ELOOP: Self

Source

pub const EWOULDBLOCK: Self

Source

pub const ENOMSG: Self

Source

pub const EIDRM: Self

Source

pub const ECHRNG: Self

Source

pub const EL2NSYNC: Self

Source

pub const EL3HLT: Self

Source

pub const EL3RST: Self

Source

pub const ELNRNG: Self

Source

pub const EUNATCH: Self

Source

pub const ENOCSI: Self

Source

pub const EL2HLT: Self

Source

pub const EBADE: Self

Source

pub const EBADR: Self

Source

pub const EXFULL: Self

Source

pub const ENOANO: Self

Source

pub const EBADRQC: Self

Source

pub const EBADSLT: Self

Source

pub const EBFONT: Self

Source

pub const ENOSTR: Self

Source

pub const ENODATA: Self

Source

pub const ETIME: Self

Source

pub const ENOSR: Self

Source

pub const ENONET: Self

Source

pub const ENOPKG: Self

Source

pub const EREMOTE: Self

Source

pub const EADV: Self

Source

pub const ESRMNT: Self

Source

pub const ECOMM: Self

Source

pub const EPROTO: Self

Source

pub const EMULTIHOP: Self

Source

pub const EDOTDOT: Self

Source

pub const EBADMSG: Self

Source

pub const EOVERFLOW: Self

Source

pub const ENOTUNIQ: Self

Source

pub const EBADFD: Self

Source

pub const EREMCHG: Self

Source

pub const ELIBACC: Self

Source

pub const ELIBBAD: Self

Source

pub const ELIBSCN: Self

Source

pub const ELIBMAX: Self

Source

pub const ELIBEXEC: Self

Source

pub const EILSEQ: Self

Source

pub const ERESTART: Self

Source

pub const ESTRPIPE: Self

Source

pub const EUSERS: Self

Source

pub const ENOTSOCK: Self

Source

pub const EDESTADDRREQ: Self

Source

pub const EMSGSIZE: Self

Source

pub const EPROTOTYPE: Self

Source

pub const ENOPROTOOPT: Self

Source

pub const EPROTONOSUPPORT: Self

Source

pub const ESOCKTNOSUPPORT: Self

Source

pub const EOPNOTSUPP: Self

Source

pub const EPFNOSUPPORT: Self

Source

pub const EAFNOSUPPORT: Self

Source

pub const EADDRINUSE: Self

Source

pub const EADDRNOTAVAIL: Self

Source

pub const ENETDOWN: Self

Source

pub const ENETUNREACH: Self

Source

pub const ENETRESET: Self

Source

pub const ECONNABORTED: Self

Source

pub const ECONNRESET: Self

Source

pub const ENOBUFS: Self

Source

pub const EISCONN: Self

Source

pub const ENOTCONN: Self

Source

pub const ESHUTDOWN: Self

Source

pub const ETOOMANYREFS: Self

Source

pub const ETIMEDOUT: Self

Source

pub const ECONNREFUSED: Self

Source

pub const EHOSTDOWN: Self

Source

pub const EHOSTUNREACH: Self

Source

pub const EALREADY: Self

Source

pub const EINPROGRESS: Self

Source

pub const ESTALE: Self

Source

pub const EUCLEAN: Self

Source

pub const ENOTNAM: Self

Source

pub const ENAVAIL: Self

Source

pub const EISNAM: Self

Source

pub const EREMOTEIO: Self

Source

pub const EDQUOT: Self

Source

pub const ENOMEDIUM: Self

Source

pub const EMEDIUMTYPE: Self

Source

pub const ECANCELED: Self

Source

pub const ENOKEY: Self

Source

pub const EKEYEXPIRED: Self

Source

pub const EKEYREVOKED: Self

Source

pub const EKEYREJECTED: Self

Source

pub const EOWNERDEAD: Self

Source

pub const ENOTRECOVERABLE: Self

Source

pub const ERFKILL: Self

Source

pub const EHWPOISON: Self

Source

pub const EINTR: Self

Source

pub const ENFILE: Self

Source

pub const EPIPE: Self

Source

pub const ESPIPE: Self

Source

pub const EBADF: Self

Source

pub const EPERM: Self

Source

pub const EFAULT: Self

Source

pub const ESRCH: Self

Source

pub const ENOENT: Self

Source

pub const ENOTTY: Self

Source

pub const EEXIST: Self

Source

pub const ECHILD: Self

Source

pub const EACCES: Self

Source

pub const ENOEXEC: Self

Source

pub const ENOTDIR: Self

Source

pub const EDEADLOCK: Self

Source

pub const EAGAIN: Self

Source

pub const ENOTSUP: Self = Self::EOPNOTSUPP

Source

pub const MAX: Self

From MAX_ERRNO in include/linux/err.h in kernel source. This doesn’t seem to be exposed in the installed kernel headers from which we generate bindings. https://github.com/torvalds/linux/blob/a4d7d701121981e3c3fe69ade376fe9f26324161/include/linux/err.h#L18

Source

pub const fn from_u16(val: u16) -> Option<Self>

Source

pub const fn to_negated_i64(self) -> i64

For C interop.

Source

pub const fn to_negated_i32(self) -> i32

For C interop.

Source

pub fn from_libc_errno() -> Self

Get libc’s errno (global for the current thread).

Source

pub fn result_from_libc_errno<T>(sentinel: T, x: T) -> Result<T, Self>
where T: Eq,

Get a Result from the return value of a libc function that uses a sentinel error value, and stores the errors themselves in errno.

Source

pub fn result_from_libc_errnum(errnum: i32) -> Result<(), Self>

Get a Result from a libc errnum return value, where 0 is used to indicate “no error”, and non-zero is an errno value. An example of such a function is libc::posix_spawn.

Panics if errnum is out of range. This shouldn’t be the case for any errnum obtained from libc APIs.

Source

pub fn from_libc_errnum(errnum: i32) -> Option<Self>

Convert from a libc error value. Returns None if out of range.

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, formatter: &mut Formatter<'_>) -> Result<(), Error>

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

impl Display for Errno

Source§

fn fmt(&self, formatter: &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)>

Returns 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 From<Errno> for Error

Source§

fn from(e: Errno) -> Self

Converts to this type from the input type.
Source§

impl From<Errno> for i32

Source§

fn from(val: Errno) -> i32

Converts to this type from the input type.
Source§

impl From<Errno> for i64

Source§

fn from(val: Errno) -> i64

Converts to this type from the input type.
Source§

impl From<Errno> for u16

Source§

fn from(val: Errno) -> u16

Converts to this type from the input type.
Source§

impl From<Errno> for u32

Source§

fn from(val: Errno) -> u32

Converts to this type from the input type.
Source§

impl From<Errno> for u64

Source§

fn from(val: Errno) -> u64

Converts to this type from the input type.
Source§

impl From<Error> for Errno

Source§

fn from(value: 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<Error> for Errno

Source§

type Error = Error

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

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

Performs the conversion.
Source§

impl TryFrom<i16> for Errno

Source§

type Error = ()

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

fn try_from(val: i16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i32> for Errno

Source§

type Error = ()

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

fn try_from(val: i32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i64> for Errno

Source§

type Error = ()

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

fn try_from(val: i64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u16> for Errno

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<u32> for Errno

Source§

type Error = ()

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

fn try_from(val: u32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u64> for Errno

Source§

type Error = ()

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

fn try_from(val: u64) -> 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, dst: *mut u8)

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