Struct linux_api::errno::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 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> 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§

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