pub struct Errno(/* private fields */);
Implementations§
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 fn name_and_description(&self) -> Option<(&'static str, &'static str)>
pub fn name_and_description(&self) -> Option<(&'static str, &'static str)>
Returns a pair containing the name of the error and a string describing the error.
source§impl Errno
impl Errno
sourcepub const EWOULDBLOCK: Self = Self::EAGAIN
pub const EWOULDBLOCK: Self = Self::EAGAIN
Operation would block. This is the same as Errno::EAGAIN
.
sourcepub const EDEADLOCK: Self = Self::EDEADLK
pub const EDEADLOCK: Self = Self::EDEADLK
Same as Errno::EDEADLK
.
sourcepub fn from_ret(value: usize) -> Result<usize, Errno>
pub fn from_ret(value: usize) -> Result<usize, Errno>
Converts a raw syscall return value to a result.
sourcepub fn result<T>(value: T) -> Result<T, Errno>where
T: ErrnoSentinel + PartialEq<T>,
pub fn result<T>(value: T) -> Result<T, Errno>where
T: ErrnoSentinel + PartialEq<T>,
Converts a value into an Errno
.
sourcepub fn name(&self) -> Option<&'static str>
pub fn name(&self) -> Option<&'static str>
Returns the name of the error. If the internal error code is unknown or
invalid, None
is returned.
sourcepub fn description(&self) -> Option<&'static str>
pub fn description(&self) -> Option<&'static str>
Returns the error description. If the internal error code is unknown or
invalid, None
is returned.
sourcepub fn from_io_error(err: Error) -> Option<Self>
pub fn from_io_error(err: Error) -> Option<Self>
Converts an std::io::Error
into an Errno
if possible. Since an error
code is just one of the few possible error types that std::io::Error
can represent, this will return None
if the conversion is not possible.
A From<std::io::Error>
implementation is not provided because this
conversion can fail. However, the reverse is possible, so that is
provided as a From
implementation.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Errno
impl<'de> Deserialize<'de> for Errno
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 for Errno
impl PartialEq for Errno
source§impl PartialOrd for Errno
impl PartialOrd 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