Enum stam::DataOperator
source · pub enum DataOperator<'a> {
Show 21 variants
Null,
Any,
Equals(&'a str),
EqualsInt(isize),
EqualsFloat(f64),
True,
False,
GreaterThan(isize),
GreaterThanOrEqual(isize),
GreaterThanFloat(f64),
GreaterThanOrEqualFloat(f64),
LessThan(isize),
LessThanOrEqual(isize),
LessThanFloat(f64),
LessThanOrEqualFloat(f64),
HasElement(&'a str),
HasElementInt(isize),
HasElementFloat(f64),
Not(Box<DataOperator<'a>>),
And(Vec<DataOperator<'a>>),
Or(Vec<DataOperator<'a>>),
}Expand description
This type defines a test that can be done on a DataValue (via DataValue::test()).
The operator does not merely consist of the operator-part, but also holds the value that is tested against, which may
be one of various types, hence the many variants of this type.
DataOperator::Any is a special variant of this operator that will always pass.
Variants§
Null
Any
Equals(&'a str)
Tests against a string
EqualsInt(isize)
Tests against a numeric integer
EqualsFloat(f64)
Tests against a numeric floating-point value
True
False
GreaterThan(isize)
The datavalue must be numeric and greater than the value with the operator
GreaterThanOrEqual(isize)
The datavalue must be numeric and greater than or equal to the value with the operator
GreaterThanFloat(f64)
The datavalue must be numeric and greater than the value with the operator
GreaterThanOrEqualFloat(f64)
The datavalue must be numeric and greater than or equal to the value with the operator
LessThan(isize)
The datavalue must be numeric and less than the value with the operator
LessThanOrEqual(isize)
The datavalue must be numeric and less than or equal to the value with the operator
LessThanFloat(f64)
The datavalue must be numeric and less than or equal to the value with the operator
LessThanOrEqualFloat(f64)
The datavalue must be numeric and less than or equal to the value with the operator
HasElement(&'a str)
HasElementInt(isize)
HasElementFloat(f64)
Not(Box<DataOperator<'a>>)
Logical negation, reverses the operator
And(Vec<DataOperator<'a>>)
Logical AND operator (conjunction) to combine multiple operators into one
Or(Vec<DataOperator<'a>>)
Logical OR operator (disjunction) to combine multiple operators into one
Implementations§
Trait Implementations§
source§impl<'a> Clone for DataOperator<'a>
impl<'a> Clone for DataOperator<'a>
source§fn clone(&self) -> DataOperator<'a>
fn clone(&self) -> DataOperator<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<'a> Debug for DataOperator<'a>
impl<'a> Debug for DataOperator<'a>
source§impl<'a> From<&'a DataValue> for DataOperator<'a>
impl<'a> From<&'a DataValue> for DataOperator<'a>
source§impl<'a> From<&'a str> for DataOperator<'a>
impl<'a> From<&'a str> for DataOperator<'a>
source§impl<'a> From<bool> for DataOperator<'a>
impl<'a> From<bool> for DataOperator<'a>
source§impl<'a> From<f64> for DataOperator<'a>
impl<'a> From<f64> for DataOperator<'a>
source§impl<'a> From<isize> for DataOperator<'a>
impl<'a> From<isize> for DataOperator<'a>
source§impl<'a> From<usize> for DataOperator<'a>
impl<'a> From<usize> for DataOperator<'a>
source§impl<'a> PartialEq for DataOperator<'a>
impl<'a> PartialEq for DataOperator<'a>
source§fn eq(&self, other: &DataOperator<'a>) -> bool
fn eq(&self, other: &DataOperator<'a>) -> bool
self and other values to be equal, and is used
by ==.