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.

Trait Implementations

impl<T: Debug> Debug for Value<T>
[src]

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

Formats the value using the given formatter.

impl<T: Clone> Clone for Value<T>
[src]

fn clone(&self) -> Value<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