Trait rulinalg::macros::ElementwiseComparator
source · [−]pub trait ElementwiseComparator<T, E>where
T: Copy,
E: ComparisonFailure,{
fn compare(&self, x: T, y: T) -> Result<(), E>;
fn description(&self) -> String;
}
Expand description
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.
Required Methods
sourcefn compare(&self, x: T, y: T) -> Result<(), E>
fn compare(&self, x: T, y: T) -> Result<(), E>
Compares two elements.
Returns the error associated with the comparison if it failed.
sourcefn description(&self) -> String
fn description(&self) -> String
A description of the comparator.