#[non_exhaustive]pub enum TestingError {
Fixture(String),
}Expand description
Errors raised by the testing utilities themselves.
These are rare — most helpers are infallible — but a few operations (e.g.
constructing fixtures from malformed input) can fail, and they report through
the shared DomainError contract like every
other klauthed error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Debug for TestingError
impl Debug for TestingError
Source§impl Display for TestingError
impl Display for TestingError
Source§impl DomainError for TestingError
impl DomainError for TestingError
Source§fn category(&self) -> ErrorCategory
fn category(&self) -> ErrorCategory
The coarse classification of this error.
Source§fn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Whether retrying might help. Defaults to the category’s policy.
Source§fn http_status(&self) -> u16
fn http_status(&self) -> u16
The HTTP status to surface. Defaults to the category’s status.
Source§impl Error for TestingError
impl Error for TestingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for TestingError
impl RefUnwindSafe for TestingError
impl Send for TestingError
impl Sync for TestingError
impl Unpin for TestingError
impl UnsafeUnpin for TestingError
impl UnwindSafe for TestingError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<E> DomainErrorExt for Ewhere
E: DomainError + ?Sized,
impl<E> DomainErrorExt for Ewhere
E: DomainError + ?Sized,
Source§fn assert_category(&self, expected: ErrorCategory) -> &Self
fn assert_category(&self, expected: ErrorCategory) -> &Self
Assert this error’s category. Returns
&self for chaining.Source§fn assert_code(&self, expected: &str) -> &Self
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
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
fn assert_retryable(&self, expected: bool) -> &Self
Assert this error’s retryability. Returns
&self for chaining.