Struct error_code::ErrorCode [−][src]
pub struct ErrorCode<C> { /* fields omitted */ }Describes error code in particular category.
Implementations
impl ErrorCode<PosixCategory>[src]
impl ErrorCode<PosixCategory>[src]pub fn last() -> Self[src]
Retrieves last error, generated by runtime
pub const fn unimplemented() -> Self[src]
Creates unimplemented error
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 fn last() -> Self[src]
Retrieves last error, generated by OS
pub const fn unimplemented() -> Self[src]
Creates unimplemented error
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 message(self) -> Str[src]
Returns textual representation of the error code
pub fn into_another<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]
impl<C> Clone for ErrorCode<C>[src]fn clone(&self) -> Self[src]
fn clone_from(&mut self, other: &Self)[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]Auto Trait Implementations
impl<C> RefUnwindSafe for ErrorCode<C> where
C: RefUnwindSafe,
impl<C> RefUnwindSafe for ErrorCode<C> where
C: RefUnwindSafe, impl<C> UnwindSafe for ErrorCode<C> where
C: UnwindSafe,
impl<C> UnwindSafe for ErrorCode<C> where
C: UnwindSafe,