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

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

Extends an Arithmetic with a comparison operation on values.

Required methods

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

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

Trait Implementations

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

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Implementors

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

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

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

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

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

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

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

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