ComparisonOperator

Trait ComparisonOperator 

Source
pub trait ComparisonOperator<Lhs, Rhs = Lhs> {
    // Required method
    fn cmp(&self, lhs: &Lhs, rhs: &Rhs) -> bool;
}

Required Methods§

Source

fn cmp(&self, lhs: &Lhs, rhs: &Rhs) -> bool

Trait Implementations§

Source§

impl<T, Rhs> Fn(&T, &Rhs) for &dyn ComparisonOperator<T, Rhs>

Source§

extern "rust-call" fn call(&self, (x, y): (&T, &Rhs)) -> bool

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, Rhs> Fn(&T, &Rhs) for Box<dyn ComparisonOperator<T, Rhs>>

Source§

extern "rust-call" fn call(&self, (x, y): (&T, &Rhs)) -> bool

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, Rhs> FnMut(&T, &Rhs) for &dyn ComparisonOperator<T, Rhs>

Source§

extern "rust-call" fn call_mut(&mut self, (x, y): (&T, &Rhs)) -> bool

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, Rhs> FnMut(&T, &Rhs) for Box<dyn ComparisonOperator<T, Rhs>>

Source§

extern "rust-call" fn call_mut(&mut self, (x, y): (&T, &Rhs)) -> bool

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, Rhs> FnOnce(&T, &Rhs) for &dyn ComparisonOperator<T, Rhs>

Source§

type Output = bool

The returned type after the call operator is used.
Source§

extern "rust-call" fn call_once(self, (x, y): (&T, &Rhs)) -> bool

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, Rhs> FnOnce(&T, &Rhs) for Box<dyn ComparisonOperator<T, Rhs>>

Source§

type Output = bool

The returned type after the call operator is used.
Source§

extern "rust-call" fn call_once(self, (x, y): (&T, &Rhs)) -> bool

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.

Implementors§

Source§

impl<T: PartialEq<Rhs>, Rhs> ComparisonOperator<T, Rhs> for EqualInt

Source§

impl<T: PartialEq<Rhs>, Rhs> ComparisonOperator<T, Rhs> for UnequalInt

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for EqualFlt<T>
where for<'a> &'a T: Add + Sub, for<'a> <&'a T as Add>::Output: PartialOrd<Rhs>, for<'a> <&'a T as Sub>::Output: PartialOrd<Rhs>,

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for GreaterFlt<T>
where for<'a> &'a T: Sub, for<'a> <&'a T as Sub>::Output: PartialOrd<Rhs>,

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for GreaterInt

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for GreaterEqualFlt<T>
where for<'a> &'a T: Add, for<'a> <&'a T as Add>::Output: PartialOrd<Rhs>,

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for GreaterEqualInt

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for LessFlt<T>
where for<'a> &'a T: Add, for<'a> <&'a T as Add>::Output: PartialOrd<Rhs>,

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for LessInt

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for LessEqualFlt<T>
where for<'a> &'a T: Sub, for<'a> <&'a T as Sub>::Output: PartialOrd<Rhs>,

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for LessEqualInt

Source§

impl<T: PartialOrd<Rhs>, Rhs> ComparisonOperator<T, Rhs> for UnequalFlt<T>
where for<'a> &'a T: Add + Sub, for<'a> <&'a T as Add>::Output: PartialOrd<Rhs>, for<'a> <&'a T as Sub>::Output: PartialOrd<Rhs>,