use core::cmp::Ordering::{self, *};
pub trait EqAbs<Rhs: ?Sized = Self> {
fn eq_abs(&self, other: &Rhs) -> bool;
#[inline]
fn ne_abs(&self, other: &Rhs) -> bool {
!self.eq_abs(other)
}
}
pub trait PartialOrdAbs<Rhs: ?Sized = Self> {
fn partial_cmp_abs(&self, other: &Rhs) -> Option<Ordering>;
#[inline]
fn lt_abs(&self, other: &Rhs) -> bool {
matches!(self.partial_cmp_abs(other), Some(Less))
}
#[inline]
fn le_abs(&self, other: &Rhs) -> bool {
matches!(self.partial_cmp_abs(other), Some(Less | Equal))
}
#[inline]
fn gt_abs(&self, other: &Rhs) -> bool {
matches!(self.partial_cmp_abs(other), Some(Greater))
}
#[inline]
fn ge_abs(&self, other: &Rhs) -> bool {
matches!(self.partial_cmp_abs(other), Some(Greater | Equal))
}
}
pub trait OrdAbs: Eq + PartialOrdAbs<Self> {
fn cmp_abs(&self, other: &Self) -> Ordering;
}