pub enum UnprocessableReason {
InvalidJsonPath(String),
MissingJsonBody,
MissingHeader,
InvalidJsonSchema(String, String),
SerializationFailure(String),
InvalidHttpRequestHeaders(String),
InvalidHeaderValue(String),
InvalidRegex(String),
HttpRequestFailure(String),
Other(String),
}Expand description
Unprocessable event reason. This enum should be used when the assertion syntax is correct but the implementor is unable to process the assertion due to an unexpected event.
For example, when an implementation asserts that a word exists in a file but there is no read access. In this case, the assertion fails not because the word is missing, but because the file content cannot be processed.
Variants§
InvalidJsonPath(String)
Unprocessable json path with the string representation of the path.
MissingJsonBody
Unprocessable json body because it’s missing.
MissingHeader
Unprocessable header value because the correspond header key is missing.
InvalidJsonSchema(String, String)
Unprocessable json schema.
SerializationFailure(String)
Serialization failure.
InvalidHttpRequestHeaders(String)
Invalid HTTP request headers.
InvalidHeaderValue(String)
Invalid HTTP header value.
InvalidRegex(String)
Invalid regex pattern.
HttpRequestFailure(String)
If the HTTP request results in an error while sending request, redirect loop was detected or redirect limit was exhausted.
Other(String)
Unprocessable entity.
Trait Implementations§
Source§impl Debug for UnprocessableReason
impl Debug for UnprocessableReason
Source§impl Display for UnprocessableReason
impl Display for UnprocessableReason
Auto Trait Implementations§
impl Freeze for UnprocessableReason
impl RefUnwindSafe for UnprocessableReason
impl Send for UnprocessableReason
impl Sync for UnprocessableReason
impl Unpin for UnprocessableReason
impl UnwindSafe for UnprocessableReason
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.