pub enum ComparisonOperator {
Eq,
Ne,
Ge,
Gt,
Le,
Lt,
}Expand description
Operator for arithmetic comparison.
Variants§
Eq
The equal to operator.
Ne
The not equal to operator.
Ge
The greater than or equal to operator.
Gt
The greater than operator.
Le
The less than operator.
Lt
The less than or equal to operator.
Implementations§
Source§impl ComparisonOperator
impl ComparisonOperator
Sourcepub fn eval<T: PartialOrd>(&self, x: T, y: T) -> bool
pub fn eval<T: PartialOrd>(&self, x: T, y: T) -> bool
Evaluate comparison.
Trait Implementations§
Source§impl Clone for ComparisonOperator
impl Clone for ComparisonOperator
Source§fn clone(&self) -> ComparisonOperator
fn clone(&self) -> ComparisonOperator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ComparisonOperator
impl Debug for ComparisonOperator
impl Eq for ComparisonOperator
Source§impl PartialEq for ComparisonOperator
impl PartialEq for ComparisonOperator
Source§fn eq(&self, other: &ComparisonOperator) -> bool
fn eq(&self, other: &ComparisonOperator) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ComparisonOperator
Auto Trait Implementations§
impl Freeze for ComparisonOperator
impl RefUnwindSafe for ComparisonOperator
impl Send for ComparisonOperator
impl Sync for ComparisonOperator
impl Unpin for ComparisonOperator
impl UnsafeUnpin for ComparisonOperator
impl UnwindSafe for ComparisonOperator
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