NearlyOrd

Trait NearlyOrd 

Source
pub trait NearlyOrd<Rhs = Self, LhsTol = Self, RhsTol = Rhs>: NearlyOrdTol<Rhs, LhsTol, RhsTol>
where Rhs: ?Sized, LhsTol: ?Sized + EpsTolerance<RhsTol> + UlpsTolerance<RhsTol>, RhsTol: ?Sized,
{ // Provided methods fn nearly_lt(&self, other: &Rhs) -> bool { ... } fn nearly_le(&self, other: &Rhs) -> bool { ... } fn nearly_gt(&self, other: &Rhs) -> bool { ... } fn nearly_ge(&self, other: &Rhs) -> bool { ... } }
Expand description

A trait for nearly ordering comparison based on a default tolerance.

This trait is a convenience trait to use nearly ordering comparison with a default tolerance. This is the same as using the NearlyOrdTol trait with Tolerance::default().

Provided Methods§

Source

fn nearly_lt(&self, other: &Rhs) -> bool

Returns whether self is strict less than other but not nearly equal to other based on the default tolerance for comparisons of self with other.

Source

fn nearly_le(&self, other: &Rhs) -> bool

Returns whether self is strict less than other or nearly equal to other based on the default tolerance for comparisons of self with other.

Source

fn nearly_gt(&self, other: &Rhs) -> bool

Returns whether self is strict greater than other but not nearly equal to other based on the default tolerance for comparisons of self with other.

Source

fn nearly_ge(&self, other: &Rhs) -> bool

Returns whether self is strict greater than other or nearly equal to other based on the default tolerance for comparisons of self with other.

Implementations on Foreign Types§

Source§

impl NearlyOrd for f32

Source§

impl NearlyOrd for f64

Source§

impl NearlyOrd for ()

Source§

impl<K, Lhs, Rhs> NearlyOrd<BTreeMap<K, Rhs>, Lhs, Rhs> for BTreeMap<K, Lhs>
where K: PartialEq, Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<K, Lhs, Rhs, S> NearlyOrd<HashMap<K, Rhs, S>, Lhs, Rhs> for HashMap<K, Lhs, S>
where K: Eq + Hash, Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>, S: BuildHasher,

Source§

impl<Lhs, Rhs> NearlyOrd<&[Rhs], Lhs, Rhs> for &[Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<&[Rhs], Lhs, Rhs> for [Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<&[Rhs], Lhs, Rhs> for VecDeque<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<&[Rhs], Lhs, Rhs> for Vec<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<[Rhs], Lhs, Rhs> for &[Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<[Rhs], Lhs, Rhs> for [Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<[Rhs], Lhs, Rhs> for VecDeque<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<[Rhs], Lhs, Rhs> for Vec<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs, Rhs), Lhs, Rhs> for (Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs, Lhs)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<(Rhs,), Lhs, Rhs> for (Lhs,)
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Box<Rhs>, Lhs, Rhs> for Box<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<LinkedList<Rhs>, Lhs, Rhs> for LinkedList<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<VecDeque<Rhs>, Lhs, Rhs> for &[Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<VecDeque<Rhs>, Lhs, Rhs> for [Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<VecDeque<Rhs>, Lhs, Rhs> for VecDeque<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<VecDeque<Rhs>, Lhs, Rhs> for Vec<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Rc<Rhs>, Lhs, Rhs> for Rc<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Arc<Rhs>, Lhs, Rhs> for Arc<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Vec<Rhs>, Lhs, Rhs> for &[Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Vec<Rhs>, Lhs, Rhs> for [Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Vec<Rhs>, Lhs, Rhs> for VecDeque<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs> NearlyOrd<Vec<Rhs>, Lhs, Rhs> for Vec<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<&[Rhs], Lhs, Rhs> for [Lhs; N]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<[Rhs; N], Lhs, Rhs> for &[Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<[Rhs; N], Lhs, Rhs> for [Lhs; N]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<[Rhs; N], Lhs, Rhs> for [Lhs]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<[Rhs; N], Lhs, Rhs> for VecDeque<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<[Rhs; N], Lhs, Rhs> for Vec<Lhs>
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<[Rhs], Lhs, Rhs> for [Lhs; N]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<VecDeque<Rhs>, Lhs, Rhs> for [Lhs; N]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs, const N: usize> NearlyOrd<Vec<Rhs>, Lhs, Rhs> for [Lhs; N]
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs>,

Source§

impl<Lhs, Rhs: ?Sized> NearlyOrd<&Rhs, Lhs, Rhs> for &Lhs
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs> + ?Sized,

Source§

impl<Lhs, Rhs: ?Sized> NearlyOrd<&Rhs, Lhs, Rhs> for &mut Lhs
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs> + ?Sized,

Source§

impl<Lhs, Rhs: ?Sized> NearlyOrd<&mut Rhs, Lhs, Rhs> for &Lhs
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs> + ?Sized,

Source§

impl<Lhs, Rhs: ?Sized> NearlyOrd<&mut Rhs, Lhs, Rhs> for &mut Lhs
where Lhs: NearlyOrd<Rhs> + EpsTolerance<Rhs> + UlpsTolerance<Rhs> + ?Sized,

Source§

impl<Lhs: Deref, Rhs: Deref> NearlyOrd<Pin<Rhs>, <Lhs as Deref>::Target, <Rhs as Deref>::Target> for Pin<Lhs>
where Lhs::Target: NearlyOrd<Rhs::Target> + EpsTolerance<Rhs::Target> + UlpsTolerance<Rhs::Target>,

Implementors§