pub trait Compare<T> {
fn compare(&self, t: T) -> CompareResult;
fn compare_no_case(&self, t: T) -> CompareResult;
}
Expand description
Abstracts comparison operations
Required methods
fn compare(&self, t: T) -> CompareResult
fn compare(&self, t: T) -> CompareResult
Compares self to another value for equality
fn compare_no_case(&self, t: T) -> CompareResult
fn compare_no_case(&self, t: T) -> CompareResult
Compares self to another value for equality independently of the case.
Warning: for &str
, the comparison is done
by lowercasing both strings and comparing
the result. This is a temporary solution until
a better one appears