[−][src]Struct error_code::ErrorCode
Describes error code in particular category.
Implementations
impl ErrorCode<PosixCategory>[src]
pub fn last() -> Self[src]
Retrieves last error, generated by runtime
pub fn is_would_block(self) -> bool[src]
Returns whether underlying error means to try again.
Under POSIX, it means either EWOULDBLOCK or EAGAIN, in some cases it can be the same
error code.
impl ErrorCode<SystemCategory>[src]
pub fn last() -> Self[src]
Retrieves last error, generated by OS
pub fn is_would_block(self) -> bool[src]
Returns whether underlying error means to try again.
Under POSIX, it means either EWOULDBLOCK or EAGAIN, in some cases it can be the same
error code.
In case of Windows, it is also WSAEWOULDBLOCK
impl<C: Category> ErrorCode<C>[src]
pub fn new(code: i32) -> Self[src]
Creates new error code in provided category.
pub fn raw_code(self) -> i32[src]
Access raw integer code
pub fn into_other<O: Category>(self) -> ErrorCode<O> where
C: IntoCategory<O>, [src]
C: IntoCategory<O>,
Converts self into error code of another category.
Requires self's category to implement IntoCategory for destination category.
Trait Implementations
impl<C> Clone for ErrorCode<C>[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, other: &Self)[src]
impl<C> Copy for ErrorCode<C>[src]
impl<C: Category> Debug for ErrorCode<C>[src]
impl<C: Category> Display for ErrorCode<C>[src]
impl<C> Eq for ErrorCode<C>[src]
impl<C: Category> Error for ErrorCode<C>[src]
fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>[src]
fn description(&self) -> &str1.0.0[src]
fn cause(&self) -> Option<&dyn Error>1.0.0[src]
impl<C> From<i32> for ErrorCode<C>[src]
impl<C> Hash for ErrorCode<C>[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<C> Ord for ErrorCode<C>[src]
fn cmp(&self, other: &Self) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl<C> PartialEq<ErrorCode<C>> for ErrorCode<C>[src]
impl<C> PartialOrd<ErrorCode<C>> for ErrorCode<C>[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl<C> Send for ErrorCode<C>[src]
impl<C> Sync for ErrorCode<C>[src]
impl<C> Unpin for ErrorCode<C>[src]
Auto Trait Implementations
impl<C> RefUnwindSafe for ErrorCode<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> UnwindSafe for ErrorCode<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,