Enum shortcut::cmp::Value

source ·
pub enum Value<'a, T: Clone + 'a> {
    Const(Cow<'a, T>),
    Column(usize),
}
Expand description

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.

Implementations§

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.

Construct a new Value by moving an existing value.

Construct a new Value by using a reference to an existing value.

Construct a new Value that refers to the value in a particular column of a row.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.