pub enum Comparison {
Equal(DbValue),
GreaterThan(DbValue),
GreaterThanOrEqual(DbValue),
LessThan(DbValue),
LessThanOrEqual(DbValue),
NotEqual(DbValue),
Contains(DbValue),
StartsWith(DbValue),
EndsWith(DbValue),
}Expand description
Comparison of database values ([DbValue]) used
by key() condition. Supports
the usual set of named comparisons: ==, !=, <, <=, >, =>
plus contains(). The comparisons are type
strict except for the contains comparison
which allows vectorized version of the base type. Notably
however it does not support the bytes and integral types
where the “contains” makes little sense (i.e. does 3 contain 1?).
Variants§
Equal(DbValue)
property == this
GreaterThan(DbValue)
property > this
GreaterThanOrEqual(DbValue)
property >= this
LessThan(DbValue)
property < this
LessThanOrEqual(DbValue)
property <= this
NotEqual(DbValue)
property != this
Contains(DbValue)
property.contains(this)
StartsWith(DbValue)
property.starts_with(this)
EndsWith(DbValue)
property.ends_with(this)
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§fn clone(&self) -> Comparison
fn clone(&self) -> Comparison
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Comparison
impl Debug for Comparison
Source§impl PartialEq for Comparison
impl PartialEq for Comparison
Source§impl Serialize for Comparison
impl Serialize for Comparison
impl StructuralPartialEq for Comparison
Auto Trait Implementations§
impl Freeze for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnsafeUnpin for Comparison
impl UnwindSafe for Comparison
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more