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§
Sourcefn assert_category(&self, expected: ErrorCategory) -> &Self
fn assert_category(&self, expected: ErrorCategory) -> &Self
Assert this error’s category. Returns &self for chaining.
Sourcefn assert_code(&self, expected: &str) -> &Self
fn assert_code(&self, expected: &str) -> &Self
Assert this error’s code string. Returns &self for chaining.
Sourcefn assert_http_status(&self, expected: u16) -> &Self
fn assert_http_status(&self, expected: u16) -> &Self
Assert this error’s HTTP status. Returns &self for chaining.
Sourcefn assert_retryable(&self, expected: bool) -> &Self
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".