ErrorAsErrorCodeExt

Trait ErrorAsErrorCodeExt 

Source
pub trait ErrorAsErrorCodeExt: ErrorAsErrorCode {
    // Required methods
    fn is_error_code(&self, expected_code: ErrorCode) -> bool;
    fn is_closed(&self) -> bool;
}
Expand description

Extensions to the stream::ErrorAsErrorCode providing some convenience methods.

Required Methods§

Source

fn is_error_code(&self, expected_code: ErrorCode) -> bool

Check of the error code matches the given value.

Source

fn is_closed(&self) -> bool

Checks that the error code exists and is zero.

Implementors§