Trait mybatis_sql::ops::PartialOrd
source · [−]pub trait PartialOrd<Rhs: ?Sized = Self> {
fn op_partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
fn op_lt(&self, other: &Rhs) -> bool { ... }
fn op_le(&self, other: &Rhs) -> bool { ... }
fn op_gt(&self, other: &Rhs) -> bool { ... }
fn op_ge(&self, other: &Rhs) -> bool { ... }
}
Required Methods
fn op_partial_cmp(&self, other: &Rhs) -> Option<Ordering>
Provided Methods
This method tests less than (for self
and other
) and is used by the <
operator.
Examples
let result = 1.0 < 2.0;
assert_eq!(result, true);
let result = 2.0 < 1.0;
assert_eq!(result, false);
This method tests less than or equal to (for self
and other
) and is used by the <=
operator.
Examples
let result = 1.0 <= 2.0;
assert_eq!(result, true);
let result = 2.0 <= 2.0;
assert_eq!(result, true);
This method tests greater than (for self
and other
) and is used by the >
operator.
Examples
let result = 1.0 > 2.0;
assert_eq!(result, false);
let result = 2.0 > 2.0;
assert_eq!(result, false);