pub struct Compare(pub Tolerance);Expand description
Tolerant::compare at the tolerance it holds, as a function object. NaN orders after every number and equal to NaN, as Tolerant::matches has NaN match NaN.
Tuple Fields§
§0: ToleranceTrait Implementations§
Source§impl Binary<f16> for Compare
impl Binary<f16> for Compare
fn one(&self, x: f16, y: f16) -> Ordering
fn judged(&self, x: f16, y: f16) -> (Ordering, bool)
fn slice( &self, x: [Arg<'_, f16>; 2], n: usize, out: &mut [MaybeUninit<Ordering>], ) -> bool
fn checked(&self, x: T, y: T) -> Option<Self::Out>
fn many( &self, x: Arg<'_, T>, y: Arg<'_, T>, n: usize, out: &mut Vec<Self::Out>, ) -> bool
fn many_into(
&self,
x: Arg<'_, T>,
y: Arg<'_, T>,
n: usize,
out: &mut Slots<'_, Self::Out>,
) -> boolwhere
T: Copy,
Source§impl Binary<f32> for Compare
impl Binary<f32> for Compare
fn one(&self, x: f32, y: f32) -> Ordering
fn judged(&self, x: f32, y: f32) -> (Ordering, bool)
fn slice( &self, [x, y]: [Arg<'_, f32>; 2], n: usize, out: &mut [MaybeUninit<Ordering>], ) -> bool
fn checked(&self, x: T, y: T) -> Option<Self::Out>
fn many( &self, x: Arg<'_, T>, y: Arg<'_, T>, n: usize, out: &mut Vec<Self::Out>, ) -> bool
fn many_into(
&self,
x: Arg<'_, T>,
y: Arg<'_, T>,
n: usize,
out: &mut Slots<'_, Self::Out>,
) -> boolwhere
T: Copy,
Source§impl Binary<f64> for Compare
impl Binary<f64> for Compare
fn one(&self, x: f64, y: f64) -> Ordering
fn judged(&self, x: f64, y: f64) -> (Ordering, bool)
fn slice( &self, [x, y]: [Arg<'_, f64>; 2], n: usize, out: &mut [MaybeUninit<Ordering>], ) -> bool
fn checked(&self, x: T, y: T) -> Option<Self::Out>
fn many( &self, x: Arg<'_, T>, y: Arg<'_, T>, n: usize, out: &mut Vec<Self::Out>, ) -> bool
fn many_into(
&self,
x: Arg<'_, T>,
y: Arg<'_, T>,
n: usize,
out: &mut Slots<'_, Self::Out>,
) -> boolwhere
T: Copy,
impl Copy for Compare
impl StructuralPartialEq for Compare
Auto Trait Implementations§
impl Forget for Compare
impl Freeze for Compare
impl RefUnwindSafe for Compare
impl Send for Compare
impl Sync for Compare
impl Unpin for Compare
impl UnsafeUnpin for Compare
impl UnwindSafe for Compare
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more