Enum shortcut::cmp::Value [−][src]
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,
T: RefUnwindSafe,
impl<'a, T> Send for Value<'a, T> where
T: Send + Sync,
T: Send + Sync,
impl<'a, T> Sync for Value<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Value<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> UnwindSafe for Value<'a, T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,