#[non_exhaustive]pub enum Op {
Eq,
Ne,
Gt,
Gte,
Lt,
Lte,
Exists,
Contains,
}Expand description
Comparison operators. Deliberately not Turing-complete.
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.
Eq
Equal.
Ne
Not equal.
Gt
Greater than (numbers).
Gte
Greater than or equal (numbers).
Lt
Less than (numbers).
Lte
Less than or equal (numbers).
Exists
Field is present and non-null.
Contains
String field contains substring, or array contains the value.
Implementations§
Source§impl Op
impl Op
Sourcepub const ALL: [Op; 8]
pub const ALL: [Op; 8]
Every operator variant, in declaration order. Drift gates and palette enumerations iterate this instead of a hand-mirrored array.
Kept complete by assert_all_ops_exhaustive, whose same-crate
exhaustive match makes a new Op variant a compile error until it is
handled — and the [Op; N] length then forces this array to grow to
match. (#[non_exhaustive] restricts only downstream crates, so the
in-crate match stays exhaustive.)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
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 Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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