Enum shortcut::cmp::Value
[−]
[src]
pub enum Value<'a, T: Clone + 'a> { Const(Cow<'a, T>), Column(usize), }
A value represents something to compare against.
Variants
Const(Cow<'a, 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<'a, T: Clone + 'a> Value<'a, T>
[src]
fn value<'b: 'a>(&'b self, row: &'b [T]) -> &'b 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.
fn new<I: Into<T>>(t: I) -> Self
Construct a new Value
by moving an existing value.
fn using<I: Borrow<T>>(t: &'a I) -> Self
Construct a new Value
by using a reference to an existing value.
fn column(c: usize) -> Self
Construct a new Value
that refers to the value in a particular column of a row.
Trait Implementations
impl<'a, T: Clone + Clone + 'a> Clone for Value<'a, T>
[src]
fn clone(&self) -> Value<'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