Struct linux_syscalls::Errno
source · #[repr(transparent)]pub struct Errno(_);Expand description
Error number representation.
Implementations§
source§impl Errno
impl Errno
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true if the error code is in valid range (lower than 4096)
sourcepub fn from_ret(value: usize) -> Result<usize, Errno>
pub fn from_ret(value: usize) -> Result<usize, Errno>
Returns a new Errno from a syscall’s result.
sourcepub fn name(&self) -> Option<&'static str>
pub fn name(&self) -> Option<&'static str>
Returns the name of the error if it’s known. Generally the name of the constant.
sourcepub fn description(&self) -> Option<&'static str>
pub fn description(&self) -> Option<&'static str>
Returns a description of the error if it’s known.
sourcepub fn from_io_error(err: Error) -> Option<Errno>
pub fn from_io_error(err: Error) -> Option<Errno>
Returns a new Errno if the given error is generated from a system error.
None otherwise.
source§impl Errno
impl Errno
sourcepub const ENAMETOOLONG: Errno = Self(36)
pub const ENAMETOOLONG: Errno = Self(36)
File name too long
sourcepub const EDESTADDRREQ: Errno = Self(89)
pub const EDESTADDRREQ: Errno = Self(89)
Destination address required
sourcepub const EPROTOTYPE: Errno = Self(91)
pub const EPROTOTYPE: Errno = Self(91)
Protocol wrong type for socket
sourcepub const ENOPROTOOPT: Errno = Self(92)
pub const ENOPROTOOPT: Errno = Self(92)
Protocol not available
sourcepub const EPROTONOSUPPORT: Errno = Self(93)
pub const EPROTONOSUPPORT: Errno = Self(93)
Protocol not supported
sourcepub const ESOCKTNOSUPPORT: Errno = Self(94)
pub const ESOCKTNOSUPPORT: Errno = Self(94)
Socket type not supported
sourcepub const EOPNOTSUPP: Errno = Self(95)
pub const EOPNOTSUPP: Errno = Self(95)
Operation not supported on transport endpoint
sourcepub const EPFNOSUPPORT: Errno = Self(96)
pub const EPFNOSUPPORT: Errno = Self(96)
Protocol family not supported
sourcepub const EAFNOSUPPORT: Errno = Self(97)
pub const EAFNOSUPPORT: Errno = Self(97)
Address family not supported by protocol
sourcepub const EADDRINUSE: Errno = Self(98)
pub const EADDRINUSE: Errno = Self(98)
Address already in use
sourcepub const EADDRNOTAVAIL: Errno = Self(99)
pub const EADDRNOTAVAIL: Errno = Self(99)
Cannot assign requested address
sourcepub const ENETUNREACH: Errno = Self(101)
pub const ENETUNREACH: Errno = Self(101)
Network is unreachable
sourcepub const ECONNABORTED: Errno = Self(103)
pub const ECONNABORTED: Errno = Self(103)
Software caused connection abort
sourcepub const ECONNRESET: Errno = Self(104)
pub const ECONNRESET: Errno = Self(104)
Connection reset by peer
sourcepub const ETOOMANYREFS: Errno = Self(109)
pub const ETOOMANYREFS: Errno = Self(109)
Too many references: cannot splice
sourcepub const ECONNREFUSED: Errno = Self(111)
pub const ECONNREFUSED: Errno = Self(111)
Connection refused
sourcepub const EHOSTUNREACH: Errno = Self(113)
pub const EHOSTUNREACH: Errno = Self(113)
No route to host
sourcepub const EINPROGRESS: Errno = Self(115)
pub const EINPROGRESS: Errno = Self(115)
Operation now in progress
sourcepub const EMEDIUMTYPE: Errno = Self(124)
pub const EMEDIUMTYPE: Errno = Self(124)
Wrong medium type
sourcepub const EKEYEXPIRED: Errno = Self(127)
pub const EKEYEXPIRED: Errno = Self(127)
Key has expired
sourcepub const EKEYREVOKED: Errno = Self(128)
pub const EKEYREVOKED: Errno = Self(128)
Key has been revoked
sourcepub const EKEYREJECTED: Errno = Self(129)
pub const EKEYREJECTED: Errno = Self(129)
Key was rejected by service
sourcepub const EOWNERDEAD: Errno = Self(130)
pub const EOWNERDEAD: Errno = Self(130)
Owner died
sourcepub const ENOTRECOVERABLE: Errno = Self(131)
pub const ENOTRECOVERABLE: Errno = Self(131)
State not recoverable
sourcepub const ERESTARTSYS: Errno = Self(512)
pub const ERESTARTSYS: Errno = Self(512)
Restart syscall
sourcepub const ERESTARTNOINTR: Errno = Self(513)
pub const ERESTARTNOINTR: Errno = Self(513)
Restart if no interrupt
sourcepub const ERESTARTNOHAND: Errno = Self(514)
pub const ERESTARTNOHAND: Errno = Self(514)
restart if no handler..
sourcepub const ENOIOCTLCMD: Errno = Self(515)
pub const ENOIOCTLCMD: Errno = Self(515)
No ioctl command
sourcepub const ERESTART_RESTARTBLOCK: Errno = Self(516)
pub const ERESTART_RESTARTBLOCK: Errno = Self(516)
restart by calling sys_restart_syscall
sourcepub const EPROBE_DEFER: Errno = Self(517)
pub const EPROBE_DEFER: Errno = Self(517)
Driver requests probe retry
sourcepub const EOPENSTALE: Errno = Self(518)
pub const EOPENSTALE: Errno = Self(518)
open found a stale dentry
sourcepub const EBADHANDLE: Errno = Self(521)
pub const EBADHANDLE: Errno = Self(521)
Illegal NFS file handle
sourcepub const EBADCOOKIE: Errno = Self(523)
pub const EBADCOOKIE: Errno = Self(523)
Cookie is stale
sourcepub const ESERVERFAULT: Errno = Self(526)
pub const ESERVERFAULT: Errno = Self(526)
An untranslatable error occurred
sourcepub const EIOCBQUEUED: Errno = Self(529)
pub const EIOCBQUEUED: Errno = Self(529)
iocb queued, will get completion event
sourcepub const ERECALLCONFLICT: Errno = Self(530)
pub const ERECALLCONFLICT: Errno = Self(530)
conflict with recalled state
sourcepub const EDEADLOCK: Errno = Self::EDEADLK
pub const EDEADLOCK: Errno = Self::EDEADLK
Alias for Self::EDEADLK
sourcepub const EWOULDBLOCK: Errno = Self::EAGAIN
pub const EWOULDBLOCK: Errno = Self::EAGAIN
Alias for Self::EAGAIN
pub const MIN: i32 = 1i32
pub const MAX: i32 = 531i32
Trait Implementations§
source§impl Error for Errno
impl Error for Errno
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl Ord for Errno
impl Ord for Errno
source§impl PartialEq<Errno> for Errno
impl PartialEq<Errno> for Errno
source§impl PartialOrd<Errno> for Errno
impl PartialOrd<Errno> for Errno
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more