Enum shortcut::cmp::Value [] [src]

pub enum Value<T> {
    Const(T),
    Column(usize),
}

A value represents something to compare against.

Variants

Const(T)

A constant value literal.

Column(usize)

A different column for the same row. Note that comparisons of this kind cannot use an index, at least not in the current implementation.

Methods

impl<T> Value<T>
[src]

fn value<'a>(&'a self, row: &'a [T]) -> &'a T

Extract the value literal for this Value when evaluated for the given row. For Const values, this evaluates to the Const value itself. For Column, it evaluates to the value of that column in the given row.