[][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 PartialEq<Threshold> for Threshold
[src]

impl Clone for Threshold
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Threshold
[src]

impl Serialize for Threshold
[src]

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

Auto Trait Implementations

impl Send for Threshold

impl Sync for Threshold

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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