pub enum MockError {
UnknownQueryParameter(String),
BadIntegerInQuery(ParseIntError),
BadValue(ParseError),
BadDateInQuery(ParseError),
BadSort(SorterError),
}
Available on crate feature
wiremock
only.Expand description
An error produced by the mock endpoint.
Variants§
UnknownQueryParameter(String)
A query parameter was provided that wasn’t recognised.
It was not a valid filtering operator, a pagination request, or an ordering expression.
BadIntegerInQuery(ParseIntError)
Failed to parse an integer.
This likely arises from limit/offset.
BadValue(ParseError)
Failed to parse an enum value.
BadDateInQuery(ParseError)
Failed to parse a date.
BadSort(SorterError)
A bad sort expression was given.
Trait Implementations§
Source§impl Error for MockError
impl Error for MockError
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()
Source§impl From<ParseError> for MockError
impl From<ParseError> for MockError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for MockError
impl From<ParseError> for MockError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for MockError
impl From<ParseIntError> for MockError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<SorterError> for MockError
impl From<SorterError> for MockError
Source§fn from(source: SorterError) -> Self
fn from(source: SorterError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MockError
impl RefUnwindSafe for MockError
impl Send for MockError
impl Sync for MockError
impl Unpin for MockError
impl UnwindSafe for MockError
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