Struct error_code::ErrorCode [−][src]
pub struct ErrorCode<C> { /* fields omitted */ }Expand description
Describes error code in particular category.
Implementations
impl ErrorCode<PosixCategory>[src]
impl ErrorCode<PosixCategory>[src]pub const fn unimplemented() -> Self[src]
pub const fn unimplemented() -> Self[src]Creates unimplemented error
pub const fn is_would_block(self) -> bool[src]
pub const 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]
impl ErrorCode<SystemCategory>[src]pub const fn unimplemented() -> Self[src]
pub const fn unimplemented() -> Self[src]Creates unimplemented error
pub const fn is_would_block(self) -> bool[src]
pub const 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]
impl<C: Category> ErrorCode<C>[src]pub fn into_another<O: Category>(self) -> ErrorCode<O> where
C: IntoCategory<O>, [src]
pub fn into_another<O: Category>(self) -> ErrorCode<O> where
C: IntoCategory<O>, [src]Converts self into error code of another category.
Requires self’s category to implement IntoCategory for destination category.
Trait Implementations
impl<C: Category> Error for ErrorCode<C>[src]
impl<C: Category> Error for ErrorCode<C>[src]fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>[src]
fn backtrace(&self) -> Option<&Backtrace>[src]backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str1.0.0[src]
fn description(&self) -> &str1.0.0[src]use the Display impl or to_string()
impl From<Error> for ErrorCode<PosixCategory>[src]
impl From<Error> for ErrorCode<PosixCategory>[src]impl From<Error> for ErrorCode<SystemCategory>[src]
impl From<Error> for ErrorCode<SystemCategory>[src]impl<C> Ord for ErrorCode<C>[src]
impl<C> Ord for ErrorCode<C>[src]impl PartialEq<Error> for ErrorCode<PosixCategory>[src]
impl PartialEq<Error> for ErrorCode<PosixCategory>[src]impl PartialEq<Error> for ErrorCode<SystemCategory>[src]
impl PartialEq<Error> for ErrorCode<SystemCategory>[src]impl<C> PartialOrd<ErrorCode<C>> for ErrorCode<C>[src]
impl<C> PartialOrd<ErrorCode<C>> for ErrorCode<C>[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<C> Copy for ErrorCode<C>[src]
impl<C> Eq for ErrorCode<C>[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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more