pub enum Operator {
Equals,
NotEquals,
Contains,
StartsWith,
EndsWith,
Gt,
Lt,
Exists,
Truthy,
Matches,
}Expand description
A comparison operator on a crate::nodes::Condition.
Variants§
Equals
Equal (type-aware: numbers compare numerically, else string-equal).
NotEquals
Not equal.
Contains
actual (as string) contains expected (as string).
StartsWith
actual (as string) starts with expected (as string).
EndsWith
actual (as string) ends with expected (as string).
Gt
Numeric greater-than.
Lt
Numeric less-than.
Exists
actual is present and not null.
Truthy
actual is truthy (non-empty string, non-zero number, true, non-empty
array/object).
Matches
actual (as string) matches expected as a regular expression.
Requires the regex crate feature; without it this always evaluates to
false.
Implementations§
Trait Implementations§
impl Copy for Operator
impl Eq for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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