Struct shortcut::cmp::Condition
[−]
[src]
pub struct Condition<'a, T: Clone + 'a> { pub column: usize, pub cmp: Comparison<'a, 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<'a, T>
The comparison to perform on the selected value.
Methods
impl<'a, T: Ord + Clone + 'a> Condition<'a, T>
[src]
fn matches<R: Row<T> + ?Sized>(&self, row: &R) -> 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<'a, T: Clone + Clone + 'a> Clone for Condition<'a, T>
[src]
fn clone(&self) -> Condition<'a, 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