ThreeWayComparisonOperator

Trait ThreeWayComparisonOperator 

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

Required Methods§

Source

fn cmp(&self, lhs: &Lhs, rhs: &Rhs) -> Option<Ordering>

Trait Implementations§

Source§

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

Source§

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

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

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

Source§

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

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

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

Source§

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

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

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

Source§

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

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

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

Source§

type Output = Option<Ordering>

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

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

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

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

Source§

type Output = Option<Ordering>

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

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

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

Implementors§

Source§

impl<T: PartialOrd<Rhs>, Rhs> ThreeWayComparisonOperator<T, Rhs> for CompareFlt<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> ThreeWayComparisonOperator<T, Rhs> for CompareInt