pub struct Errno(/* private fields */);
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
pub const ENAMETOOLONG: Errno
File name too long
Sourcepub const EDESTADDRREQ: Errno
pub const EDESTADDRREQ: Errno
Destination address required
Sourcepub const EPROTOTYPE: Errno
pub const EPROTOTYPE: Errno
Protocol wrong type for socket
Sourcepub const ENOPROTOOPT: Errno
pub const ENOPROTOOPT: Errno
Protocol not available
Sourcepub const EPROTONOSUPPORT: Errno
pub const EPROTONOSUPPORT: Errno
Protocol not supported
Sourcepub const ESOCKTNOSUPPORT: Errno
pub const ESOCKTNOSUPPORT: Errno
Socket type not supported
Sourcepub const EOPNOTSUPP: Errno
pub const EOPNOTSUPP: Errno
Operation not supported on transport endpoint
Sourcepub const EPFNOSUPPORT: Errno
pub const EPFNOSUPPORT: Errno
Protocol family not supported
Sourcepub const EAFNOSUPPORT: Errno
pub const EAFNOSUPPORT: Errno
Address family not supported by protocol
Sourcepub const EADDRINUSE: Errno
pub const EADDRINUSE: Errno
Address already in use
Sourcepub const EADDRNOTAVAIL: Errno
pub const EADDRNOTAVAIL: Errno
Cannot assign requested address
Sourcepub const ENETUNREACH: Errno
pub const ENETUNREACH: Errno
Network is unreachable
Sourcepub const ECONNABORTED: Errno
pub const ECONNABORTED: Errno
Software caused connection abort
Sourcepub const ECONNRESET: Errno
pub const ECONNRESET: Errno
Connection reset by peer
Sourcepub const ETOOMANYREFS: Errno
pub const ETOOMANYREFS: Errno
Too many references: cannot splice
Sourcepub const ECONNREFUSED: Errno
pub const ECONNREFUSED: Errno
Connection refused
Sourcepub const EHOSTUNREACH: Errno
pub const EHOSTUNREACH: Errno
No route to host
Sourcepub const EINPROGRESS: Errno
pub const EINPROGRESS: Errno
Operation now in progress
Sourcepub const EMEDIUMTYPE: Errno
pub const EMEDIUMTYPE: Errno
Wrong medium type
Sourcepub const EKEYEXPIRED: Errno
pub const EKEYEXPIRED: Errno
Key has expired
Sourcepub const EKEYREVOKED: Errno
pub const EKEYREVOKED: Errno
Key has been revoked
Sourcepub const EKEYREJECTED: Errno
pub const EKEYREJECTED: Errno
Key was rejected by service
Sourcepub const EOWNERDEAD: Errno
pub const EOWNERDEAD: Errno
Owner died
Sourcepub const ENOTRECOVERABLE: Errno
pub const ENOTRECOVERABLE: Errno
State not recoverable
Sourcepub const ERESTARTSYS: Errno
pub const ERESTARTSYS: Errno
Restart syscall
Sourcepub const ERESTARTNOINTR: Errno
pub const ERESTARTNOINTR: Errno
Restart if no interrupt
Sourcepub const ERESTARTNOHAND: Errno
pub const ERESTARTNOHAND: Errno
restart if no handler..
Sourcepub const ENOIOCTLCMD: Errno
pub const ENOIOCTLCMD: Errno
No ioctl command
Sourcepub const ERESTART_RESTARTBLOCK: Errno
pub const ERESTART_RESTARTBLOCK: Errno
restart by calling sys_restart_syscall
Sourcepub const EPROBE_DEFER: Errno
pub const EPROBE_DEFER: Errno
Driver requests probe retry
Sourcepub const EOPENSTALE: Errno
pub const EOPENSTALE: Errno
open found a stale dentry
Sourcepub const EBADHANDLE: Errno
pub const EBADHANDLE: Errno
Illegal NFS file handle
Sourcepub const EBADCOOKIE: Errno
pub const EBADCOOKIE: Errno
Cookie is stale
Sourcepub const ESERVERFAULT: Errno
pub const ESERVERFAULT: Errno
An untranslatable error occurred
Sourcepub const EIOCBQUEUED: Errno
pub const EIOCBQUEUED: Errno
iocb queued, will get completion event
Sourcepub const ERECALLCONFLICT: Errno
pub const ERECALLCONFLICT: Errno
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