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.

Implementations

impl<'a, T: Ord + Clone + 'a> Condition<'a, T>[src]

pub fn matches<R: Row<T> + ?Sized>(&self, row: &R) -> bool[src]

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 + 'a> Clone for Condition<'a, T>[src]

impl<'a, T: Debug + Clone + 'a> Debug for Condition<'a, T>[src]

impl<'a, T: Display + Clone + 'a> Display for Condition<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Condition<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for Condition<'a, T> where
    T: Send + Sync

impl<'a, T> Sync for Condition<'a, T> where
    T: Sync

impl<'a, T> Unpin for Condition<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for Condition<'a, T> where
    T: RefUnwindSafe + UnwindSafe

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> 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> ToString for T where
    T: Display + ?Sized
[src]

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.