pub struct EqCondition {
    pub name: String,
    pub value: Value,
    pub options: EqCondOptions,
}Expand description
A condition that compares values for equality.
This operator supports:
- boolean
 - strings, optionally ignoring ASCII-case
 - UUIDs
 
Fields§
§name: StringPath of the field that should match the value.
value: ValueThe value to check against.
When comparing with a string field, this value can be an array. The condition matches if any of the provided values matches the field.
options: EqCondOptionsConfiguration options for the condition.
Implementations§
Source§impl EqCondition
 
impl EqCondition
Sourcepub fn new(field: impl Into<String>, value: impl Into<Value>) -> Self
 
pub fn new(field: impl Into<String>, value: impl Into<Value>) -> Self
Creates a new condition that checks for equality.
By default, this condition will perform a case-sensitive check. To ignore ASCII case, use
EqCondition::ignore_case.
The main way to create this conditions is RuleCondition::eq.
Sourcepub fn ignore_case(self) -> Self
 
pub fn ignore_case(self) -> Self
Enables case-insensitive comparisions for this rule.
To create such a condition directly, use RuleCondition::eq_ignore_case.
Trait Implementations§
Source§impl Clone for EqCondition
 
impl Clone for EqCondition
Source§fn clone(&self) -> EqCondition
 
fn clone(&self) -> EqCondition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for EqCondition
 
impl Debug for EqCondition
Source§impl<'de> Deserialize<'de> for EqCondition
 
impl<'de> Deserialize<'de> for EqCondition
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
Source§impl PartialEq for EqCondition
 
impl PartialEq for EqCondition
Source§impl Serialize for EqCondition
 
impl Serialize for EqCondition
impl StructuralPartialEq for EqCondition
Auto Trait Implementations§
impl Freeze for EqCondition
impl RefUnwindSafe for EqCondition
impl Send for EqCondition
impl Sync for EqCondition
impl Unpin for EqCondition
impl UnwindSafe for EqCondition
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