[][src]Trait arithmetic_eval::arith::OrdArithmetic

pub trait OrdArithmetic<T>: Arithmetic<T> {
    pub fn partial_cmp(&self, x: &T, y: &T) -> Option<Ordering>;
}

Extends an Arithmetic with a comparison operation on numbers.

Required methods

pub fn partial_cmp(&self, x: &T, y: &T) -> Option<Ordering>[src]

Compares two numbers. Returns None if the numbers are not comparable, or the comparison result otherwise.

Loading content...

Trait Implementations

impl<T, '_> Debug for dyn OrdArithmetic<T> + '_[src]

Implementors

impl<T> OrdArithmetic<T> for StdArithmetic where
    Self: Arithmetic<T>,
    T: PartialOrd
[src]

impl<T> OrdArithmetic<T> for WrappingArithmetic where
    Self: Arithmetic<T>,
    T: PartialOrd
[src]

impl<T, A> OrdArithmetic<T> for FullArithmetic<T, A> where
    A: Arithmetic<T>, 
[src]

impl<T, Kind> OrdArithmetic<T> for CheckedArithmetic<Kind> where
    Self: Arithmetic<T>,
    T: PartialOrd
[src]

Loading content...