pub enum Test {
String(StringTest),
Regex {
pattern: String,
flags: RegexFlags,
},
Cidr(Network),
Exists(bool),
Null,
Equals(Number),
Boolean(bool),
Compare {
op: Comparison,
value: Number,
},
FieldRef {
paths: Vec<FieldPath>,
cased: bool,
},
}Expand description
A question about the values a predicate’s paths reach.
Variants§
String(StringTest)
Some string value matches the pattern.
Regex
Some string value matches the regular expression.
Fields
§
flags: RegexFlagsFlags from the rule.
Cidr(Network)
Some value is an IP address inside the network.
Exists(bool)
Some non-null value exists, or, when false, none does.
Null
No non-null value exists.
Equals(Number)
Some value equals the number, whether stored as a number or as its decimal text.
Boolean(bool)
Some value is the boolean.
Compare
Some numeric value compares to the number as stated.
FieldRef
Some value equals some value reached by another set of paths.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Test
impl<'de> Deserialize<'de> for Test
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Test
Auto Trait Implementations§
impl Forget for Test
impl Freeze for Test
impl Move for Test
impl RefUnwindSafe for Test
impl Send for Test
impl Sync for Test
impl Unpin for Test
impl UnsafeUnpin for Test
impl UnwindSafe for Test
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