Trait AsErrorCodeExt

Source
pub trait AsErrorCodeExt<ErrorCode>: AsErrorCode<ErrorCode>
where ErrorCode: TryInto<u32> + Send + Sync,
{ // Required methods fn as_error_code_value(&self) -> Option<u32>; fn is_error_code(&self, expected_code: u32) -> bool; fn is_closed(&self) -> bool; }
Expand description

Extensions to the .

Required Methods§

Source

fn as_error_code_value(&self) -> Option<u32>

Get the error code value.

Source

fn is_error_code(&self, expected_code: u32) -> 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§

Source§

impl<T, ErrorCode> AsErrorCodeExt<ErrorCode> for T
where T: AsErrorCode<ErrorCode>, ErrorCode: TryInto<u32> + Send + Sync,