[][src]Struct ieql::query::threshold::Threshold

pub struct Threshold {
    pub considers: Vec<ThresholdConsideration>,
    pub requires: usize,
    pub inverse: bool,
}

The Threshold struct allows for the boolean output of triggers to be composed so that only certain combinations constitute a 'match.'

You can think of the Threshold as a boolean expression that defines when a query matches.

Fields

considers: Vec<ThresholdConsideration>requires: usizeinverse: bool

Methods

impl Threshold[src]

pub fn evaluate(&self, triggers: &HashMap<&String, bool>) -> Result<bool, Issue>[src]

Evaluates the threshold based on the given data.

Arguments

  • triggers: a HashMap where the keys are Trigger IDs and the values are whether they matched or not

Trait Implementations

impl Clone for Threshold[src]

impl Debug for Threshold[src]

impl<'de> Deserialize<'de> for Threshold[src]

impl PartialEq<Threshold> for Threshold[src]

impl Serialize for Threshold[src]

impl StructuralPartialEq for Threshold[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,