pub enum ElementaryTest {
Equals {
attribute: String,
value: AttributeValue,
},
Contains {
attribute: String,
substring: String,
},
StartsWith {
attribute: String,
prefix: String,
},
EndsWith {
attribute: String,
suffix: String,
},
Regex {
attribute: String,
pattern: Regex,
},
GreaterThan {
attribute: String,
value: f64,
},
LessThan {
attribute: String,
value: f64,
},
In {
attribute: String,
values: Vec<AttributeValue>,
},
Exists {
attribute: String,
},
}Expand description
Represents an elementary test that can be performed on an event attribute
Variants§
Equals
Tests if an attribute equals a value
Fields
§
value: AttributeValueThe value to compare against
Contains
Tests if an attribute contains a substring (for string attributes)
Fields
StartsWith
Tests if an attribute starts with a prefix (for string attributes)
EndsWith
Tests if an attribute ends with a suffix (for string attributes)
Regex
Tests if an attribute matches a regex pattern (for string attributes)
Fields
GreaterThan
Tests if a numeric attribute is greater than a value
LessThan
Tests if a numeric attribute is less than a value
In
Tests if an attribute is in a list of values
Fields
§
values: Vec<AttributeValue>The list of values to check against
Exists
Tests if an attribute exists
Implementations§
Trait Implementations§
Source§impl Clone for ElementaryTest
impl Clone for ElementaryTest
Source§fn clone(&self) -> ElementaryTest
fn clone(&self) -> ElementaryTest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ElementaryTest
impl Debug for ElementaryTest
Source§impl<'de> Deserialize<'de> for ElementaryTest
impl<'de> Deserialize<'de> for ElementaryTest
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 ElementaryTest
impl PartialEq for ElementaryTest
Auto Trait Implementations§
impl Freeze for ElementaryTest
impl RefUnwindSafe for ElementaryTest
impl Send for ElementaryTest
impl Sync for ElementaryTest
impl Unpin for ElementaryTest
impl UnsafeUnpin for ElementaryTest
impl UnwindSafe for ElementaryTest
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