ErrorAsErrorCode

Trait ErrorAsErrorCode 

Source
pub trait ErrorAsErrorCode: Send {
    // Required method
    fn as_error_code(&self) -> Option<ErrorCode>;
}
Expand description

Returns the error code for the stream operation error when the error originates from a stream abort. If an error

Useful to read the error from when the stream send side or receive side is aborted.

If no error code was passed, this call returns 0.

Required Methods§

Source

fn as_error_code(&self) -> Option<ErrorCode>

Returns the stream error code.

If error is an internal implementation error as opposed to a protocol error - returns None.

Implementors§