pub struct Errno(/* private fields */);
Expand description
Error number representation.
Implementations§
Source§impl Errno
impl Errno
Sourcepub const EKEEPLOOKING: Self
pub const EKEEPLOOKING: Self
kernel internal error
Sourcepub const EREDRIVEOPEN: Self
pub const EREDRIVEOPEN: Self
kernel internal error
Sourcepub const EJUSTRETURN: Self
pub const EJUSTRETURN: Self
don’t modify regs, just return
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 EPFNOSUPPORT: Self
pub const EPFNOSUPPORT: Self
Protocol family not supported
Sourcepub const EAFNOSUPPORT: Self
pub const EAFNOSUPPORT: Self
Address family not supported by protocol family
Sourcepub const EADDRINUSE: Self
pub const EADDRINUSE: Self
Address already in use
Sourcepub const EADDRNOTAVAIL: Self
pub const EADDRNOTAVAIL: Self
Can’t 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: can’t 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 ERPCMISMATCH: Self
pub const ERPCMISMATCH: Self
RPC version wrong
Sourcepub const EPROGUNAVAIL: Self
pub const EPROGUNAVAIL: Self
RPC prog. not avail
Sourcepub const EPROGMISMATCH: Self
pub const EPROGMISMATCH: Self
Program version wrong
Sourcepub const EPROCUNAVAIL: Self
pub const EPROCUNAVAIL: Self
Bad procedure for program
Sourcepub const ESHLIBVERS: Self
pub const ESHLIBVERS: Self
Shared library version mismatch
Sourcepub const EOPNOTSUPP: Self
pub const EOPNOTSUPP: Self
Operation not supported on socket
Sourcepub const ENOTRECOVERABLE: Self
pub const ENOTRECOVERABLE: Self
State not recoverable
Sourcepub const EOWNERDEAD: Self
pub const EOWNERDEAD: Self
Previous owner died
Sourcepub const EWOULDBLOCK: Self = Self::EAGAIN
pub const EWOULDBLOCK: Self = Self::EAGAIN
Alias for Self::EAGAIN
pub const MIN: i32 = -8i32
pub const MAX: i32 = 512i32
Source§impl Errno
impl Errno
Sourcepub const fn is_valid(&self) -> bool
pub const 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>
pub fn from_io_error(err: Error) -> Option<Self>
Returns a new Errno
if the given error is generated from a system error.
None otherwise.
Sourcepub fn last_os_error() -> Self
pub fn last_os_error() -> Self
Returns a new Errno
from last OS error.
Trait Implementations§
Source§impl Error for Errno
impl Error for Errno
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
)