#[non_exhaustive]pub enum JsonRule {
Exists {
pointer: String,
},
Equals {
pointer: String,
expected: Value,
},
StringContains {
pointer: String,
needle: String,
case_sensitive: bool,
},
NumberRange {
pointer: String,
min: Option<f64>,
max: Option<f64>,
},
}Expand description
Deterministic rule over a target JSON output.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Exists
A JSON pointer resolves to a value.
Equals
A JSON pointer equals one exact JSON value.
StringContains
A pointed-to string contains a required substring.
Fields
NumberRange
A pointed-to number lies inside inclusive optional bounds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonRule
impl RefUnwindSafe for JsonRule
impl Send for JsonRule
impl Sync for JsonRule
impl Unpin for JsonRule
impl UnsafeUnpin for JsonRule
impl UnwindSafe for JsonRule
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