pub enum JsonPathPredicateMode {
Strict,
Matches,
}Expand description
How a JSONPath predicate converts its query result to a boolean.
Selected through JsonPathConfig::predicate_mode.
Variants§
Strict
Only a JSON boolean result is a valid predicate result. Any other
value kind is a type-mismatch error; no truthiness coercion is
applied (change language-value-boundary, sealed Q3).
Matches
Cardinality coercion over the raw match sequence: zero matches
(including a missing path) are false; exactly one boolean match is
that boolean; every other non-empty match sequence is true. No
value-based truthiness is imported (empty strings and 0 stay
true — this is not XPath boolean() value semantics).
Trait Implementations§
Source§impl Clone for JsonPathPredicateMode
impl Clone for JsonPathPredicateMode
impl Copy for JsonPathPredicateMode
Source§impl Debug for JsonPathPredicateMode
impl Debug for JsonPathPredicateMode
Source§impl Default for JsonPathPredicateMode
impl Default for JsonPathPredicateMode
impl Eq for JsonPathPredicateMode
Source§impl PartialEq for JsonPathPredicateMode
impl PartialEq for JsonPathPredicateMode
impl StructuralPartialEq for JsonPathPredicateMode
Auto Trait Implementations§
impl Freeze for JsonPathPredicateMode
impl RefUnwindSafe for JsonPathPredicateMode
impl Send for JsonPathPredicateMode
impl Sync for JsonPathPredicateMode
impl Unpin for JsonPathPredicateMode
impl UnsafeUnpin for JsonPathPredicateMode
impl UnwindSafe for JsonPathPredicateMode
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