Struct shortcut::cmp::Condition [] [src]

pub struct Condition<T: PartialOrd> {
    pub column: usize,
    pub cmp: Comparison<T>,
}

A single condition to evaluate for a row in the dataset.

Fields

column: usize

The column of the row to use as the comparison value.

cmp: Comparison<T>

The comparison to perform on the selected value.

Methods

impl<T: PartialOrd> Condition<T>
[src]

fn matches(&self, row: &[T]) -> bool

Returns true if this condition holds true for the given row. To determine if this is the case, row[self.column] is extracted, and is evaluated using the comparison in self.cmp.