Skip to main content

DomainErrorExt

Trait DomainErrorExt 

Source
pub trait DomainErrorExt: DomainError {
    // Provided methods
    fn assert_category(&self, expected: ErrorCategory) -> &Self { ... }
    fn assert_code(&self, expected: &str) -> &Self { ... }
    fn assert_http_status(&self, expected: u16) -> &Self { ... }
    fn assert_retryable(&self, expected: bool) -> &Self { ... }
}
Expand description

Fluent assertions on any DomainError, each returning &self so they chain.

Provided Methods§

Source

fn assert_category(&self, expected: ErrorCategory) -> &Self

Assert this error’s category. Returns &self for chaining.

Source

fn assert_code(&self, expected: &str) -> &Self

Assert this error’s code string. Returns &self for chaining.

Source

fn assert_http_status(&self, expected: u16) -> &Self

Assert this error’s HTTP status. Returns &self for chaining.

Source

fn assert_retryable(&self, expected: bool) -> &Self

Assert this error’s retryability. Returns &self for chaining.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§