pub enum JsonPathError {
AssertionFailed {
message: String,
path: String,
actual: Value,
expected: Option<Value>,
context: HashMap<String, String>,
},
InvalidPath(String),
}
Variants§
Implementations§
Source§impl JsonPathError
impl JsonPathError
pub fn assertion_failed( message: impl Into<String>, path: impl Into<String>, actual: Value, expected: Option<Value>, context: HashMap<String, String>, ) -> Self
pub fn type_mismatch(path: String, actual: Value, expected_type: &str) -> Self
pub fn value_mismatch(path: String, actual: Value, expected: Value) -> Self
pub fn comparison_failed( path: String, actual: Value, operation: &str, comparison_value: Value, ) -> Self
pub fn property_error( path: String, actual: Value, message: String, context: HashMap<String, String>, ) -> Self
Trait Implementations§
Source§impl Debug for JsonPathError
impl Debug for JsonPathError
Source§impl Display for JsonPathError
impl Display for JsonPathError
Source§impl Error for JsonPathError
impl Error for JsonPathError
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 JsonPathError
impl RefUnwindSafe for JsonPathError
impl Send for JsonPathError
impl Sync for JsonPathError
impl Unpin for JsonPathError
impl UnwindSafe for JsonPathError
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