pub trait ExpectedError {
// Required methods
fn expected_code(&self) -> String;
fn expected_status(&self) -> Option<u16>;
}Expand description
The error an ApiResponse::assert_api_error expects: a code such as "not_found", which
checks no status, or an ErrorCode, which also checks the code’s own status.
Required Methods§
Sourcefn expected_code(&self) -> String
fn expected_code(&self) -> String
The code, such as not_found.
Sourcefn expected_status(&self) -> Option<u16>
fn expected_status(&self) -> Option<u16>
The status the response must have, if any.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".