NngError

Trait NngError 

Source
pub trait NngError {
    // Required methods
    fn is_cancelled(&self) -> bool;
    fn is_timed_out(&self) -> bool;
    fn is_conn_aborted(&self) -> bool;
    fn is_conn_reset(&self) -> bool;
    fn is_conn_refused(&self) -> bool;
    fn is_peer_auth(&self) -> bool;
    fn is_crypto(&self) -> bool;
}
Expand description

Extension to error code with shortcut for some meaningful checks

Required Methods§

Source

fn is_cancelled(&self) -> bool

Returns whether error code indicates cancellation of future.

Source

fn is_timed_out(&self) -> bool

Returns whether error code indicates operation timed out.

Source

fn is_conn_aborted(&self) -> bool

Returns whether error code indicates aborted connection.

Source

fn is_conn_reset(&self) -> bool

Returns whether error code indicates connection has been reset.

Source

fn is_conn_refused(&self) -> bool

Returns whether error code indicates connection has been refused.

Source

fn is_peer_auth(&self) -> bool

Returns whether error code indicates problem with peer’s authentication

Source

fn is_crypto(&self) -> bool

Returns whether error code indicates problem using crypto

This is mostly indicates invalid local configuration (i.e. no TLS certificate etc)

Implementors§