Trait matrixcompare::comparators::ElementwiseComparator[][src]

pub trait ElementwiseComparator<T> {
    type Error: Display;
    fn compare(&self, x: &T, y: &T) -> Result<(), Self::Error>;
fn description(&self) -> String; }

Trait that describes elementwise comparators for assert_matrix_eq!.

Usually you should not need to interface with this trait directly. It is a part of the documentation only so that the trait bounds for the comparators are made public.

Associated Types

Loading content...

Required methods

fn compare(&self, x: &T, y: &T) -> Result<(), Self::Error>[src]

Compares two elements.

Returns the error associated with the comparison if it failed.

fn description(&self) -> String[src]

A description of the comparator.

Loading content...

Implementors

impl<T> ElementwiseComparator<T> for AbsoluteElementwiseComparator<T> where
    T: Clone + Display + Num + PartialOrd<T>, 
[src]

type Error = AbsoluteError<T>

impl<T> ElementwiseComparator<T> for ExactElementwiseComparator where
    T: Display + PartialEq<T>, 
[src]

type Error = ExactError

impl<T> ElementwiseComparator<T> for FloatElementwiseComparator<T> where
    T: Ulp + FloatCore + Display
[src]

type Error = UlpError

impl<T> ElementwiseComparator<T> for UlpElementwiseComparator where
    T: Ulp
[src]

type Error = UlpError

Loading content...