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.

Implementations

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

pub fn value<'b: 'a, R: Row<T> + ?Sized>(&'b self, row: &'b R) -> &'b T[src]

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.

pub fn new<I: Into<T>>(t: I) -> Self[src]

Construct a new Value by moving an existing value.

pub fn using<I: Borrow<T>>(t: &'a I) -> Self[src]

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

pub fn column(c: usize) -> Self[src]

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

Trait Implementations

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

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

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

Auto Trait Implementations

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

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

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

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

impl<'a, T> UnwindSafe for Value<'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.