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.

Trait Implementations

impl<T: Debug + PartialOrd> Debug for Condition<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Clone + PartialOrd> Clone for Condition<T>
[src]

fn clone(&self) -> Condition<T>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more