pub struct Errno(/* private fields */);
target_arch="sparc"
or SPARC64) and Linux, or crate feature sparc
, or crate feature sparc64
only.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<Self>
Available on crate feature std
only.
pub fn from_io_error(err: Error) -> Option<Self>
std
only.Returns a new Errno
if the given error is generated from a system error.
None otherwise.
Source§impl Errno
impl Errno
Sourcepub const EINPROGRESS: Self
pub const EINPROGRESS: Self
Operation now in progress
Sourcepub const EDESTADDRREQ: Self
pub const EDESTADDRREQ: Self
Destination address required
Sourcepub const EPROTOTYPE: Self
pub const EPROTOTYPE: Self
Protocol wrong type for socket
Sourcepub const ENOPROTOOPT: Self
pub const ENOPROTOOPT: Self
Protocol not available
Sourcepub const EPROTONOSUPPORT: Self
pub const EPROTONOSUPPORT: Self
Protocol not supported
Sourcepub const ESOCKTNOSUPPORT: Self
pub const ESOCKTNOSUPPORT: Self
Socket type not supported
Sourcepub const EOPNOTSUPP: Self
pub const EOPNOTSUPP: Self
Op not supported on transport endpoint
Sourcepub const EPFNOSUPPORT: Self
pub const EPFNOSUPPORT: Self
Protocol family not supported
Sourcepub const EAFNOSUPPORT: Self
pub const EAFNOSUPPORT: Self
Address family not supported by protocol
Sourcepub const EADDRINUSE: Self
pub const EADDRINUSE: Self
Address already in use
Sourcepub const EADDRNOTAVAIL: Self
pub const EADDRNOTAVAIL: Self
Cannot assign requested address
Sourcepub const ENETUNREACH: Self
pub const ENETUNREACH: Self
Network is unreachable
Sourcepub const ECONNABORTED: Self
pub const ECONNABORTED: Self
Software caused connection abort
Sourcepub const ECONNRESET: Self
pub const ECONNRESET: Self
Connection reset by peer
Sourcepub const ETOOMANYREFS: Self
pub const ETOOMANYREFS: Self
Too many references: cannot splice
Sourcepub const ECONNREFUSED: Self
pub const ECONNREFUSED: Self
Connection refused
Sourcepub const ENAMETOOLONG: Self
pub const ENAMETOOLONG: Self
File name too long
Sourcepub const EHOSTUNREACH: Self
pub const EHOSTUNREACH: Self
No route to host
Sourcepub const EMEDIUMTYPE: Self
pub const EMEDIUMTYPE: Self
Wrong medium type
Sourcepub const EKEYEXPIRED: Self
pub const EKEYEXPIRED: Self
Key has expired
Sourcepub const EKEYREVOKED: Self
pub const EKEYREVOKED: Self
Key has been revoked
Sourcepub const EKEYREJECTED: Self
pub const EKEYREJECTED: Self
Key was rejected by service
Sourcepub const EOWNERDEAD: Self
pub const EOWNERDEAD: Self
Owner died
Sourcepub const ENOTRECOVERABLE: Self
pub const ENOTRECOVERABLE: Self
State not recoverable
Sourcepub const ERESTARTSYS: Self
pub const ERESTARTSYS: Self
Restart syscall
Sourcepub const ERESTARTNOINTR: Self
pub const ERESTARTNOINTR: Self
Restart if no interrupt
Sourcepub const ERESTARTNOHAND: Self
pub const ERESTARTNOHAND: Self
restart if no handler..
Sourcepub const ENOIOCTLCMD: Self
pub const ENOIOCTLCMD: Self
No ioctl command
Sourcepub const ERESTART_RESTARTBLOCK: Self
pub const ERESTART_RESTARTBLOCK: Self
restart by calling sys_restart_syscall
Sourcepub const EPROBE_DEFER: Self
pub const EPROBE_DEFER: Self
Driver requests probe retry
Sourcepub const EOPENSTALE: Self
pub const EOPENSTALE: Self
open found a stale dentry
Sourcepub const EBADHANDLE: Self
pub const EBADHANDLE: Self
Illegal NFS file handle
Sourcepub const EBADCOOKIE: Self
pub const EBADCOOKIE: Self
Cookie is stale
Sourcepub const ESERVERFAULT: Self
pub const ESERVERFAULT: Self
An untranslatable error occurred
Sourcepub const EIOCBQUEUED: Self
pub const EIOCBQUEUED: Self
iocb queued, will get completion event
Sourcepub const ERECALLCONFLICT: Self
pub const ERECALLCONFLICT: Self
conflict with recalled state
Sourcepub const EWOULDBLOCK: Self = Self::EAGAIN
pub const EWOULDBLOCK: Self = Self::EAGAIN
Alias for Self::EAGAIN
pub const MIN: i32 = 1i32
pub const MAX: i32 = 531i32
Trait Implementations§
Source§impl Error for Errno
Available on crate feature std
only.
impl Error for Errno
std
only.1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl Ord for Errno
impl Ord for Errno
Source§impl PartialOrd for Errno
impl PartialOrd for Errno
impl Copy for Errno
impl Eq for Errno
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit
)