pub enum DenialAssertError {
Status {
expected: StatusCode,
actual: StatusCode,
},
Body(Error),
Json(Error),
Shape,
Fields {
actual: Vec<String>,
},
Error {
expected: DenialError,
actual: DenialError,
},
Message {
expected: String,
actual: String,
},
Reason {
expected: Option<String>,
actual: Option<String>,
},
}Expand description
Error returned by assert_denial_response.
Variants§
Status
The HTTP status did not match.
Body(Error)
The response body could not be collected.
Json(Error)
The response body was not a DenialBody JSON payload.
Shape
The response body was not a JSON object.
Fields
The response body contained unexpected fields.
Error
The denial category did not match.
Message
The denial message did not match.
Reason
The denial reason did not match.
Trait Implementations§
Source§impl Debug for DenialAssertError
impl Debug for DenialAssertError
Source§impl Display for DenialAssertError
impl Display for DenialAssertError
Source§impl Error for DenialAssertError
impl Error for DenialAssertError
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 !RefUnwindSafe for DenialAssertError
impl !UnwindSafe for DenialAssertError
impl Freeze for DenialAssertError
impl Send for DenialAssertError
impl Sync for DenialAssertError
impl Unpin for DenialAssertError
impl UnsafeUnpin for DenialAssertError
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