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>
👎Deprecated: It is recommended to explicitly use u32 or u64.
pub fn from_ret(value: usize) -> Result<usize, Errno>
Converts a raw syscall return value to a result.
Please use
Errno::from_ret_u32orErrno::from_ret_u64. RefactoredErrno::from_retto handle u32 and u64 explicitly, instead of using usize.
Sourcepub fn from_ret_u32(value: u32) -> Result<u32, Errno>
pub fn from_ret_u32(value: u32) -> Result<u32, Errno>
Rewriting of Errno::from_ret to use a u32 for pointer width. This function is for platforms where a pointer has a size of 32 bits.
Sourcepub fn from_ret_u64(value: u64) -> Result<u64, Errno>
pub fn from_ret_u64(value: u64) -> Result<u64, Errno>
Rewriting of Errno::from_ret to use a u64 for register width. This function is for platforms where the syscall return register is 64 bits.
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.