nom

Trait Compare

Source
pub trait Compare<T> {
    // Required methods
    fn compare(&self, t: T) -> CompareResult;
    fn compare_no_case(&self, t: T) -> CompareResult;
}
Expand description

Abstracts comparison operations

Required Methods§

Source

fn compare(&self, t: T) -> CompareResult

Compares self to another value for equality

Source

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

Implementations on Foreign Types§

Source§

impl<'a> Compare<[u8; 0]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 1]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 2]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 3]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 4]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 5]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 6]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 7]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 8]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 9]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 10]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 11]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 12]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 13]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 14]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 15]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 16]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 17]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 18]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 19]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 20]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 21]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 22]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 23]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 24]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 25]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 26]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 27]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 28]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 29]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 30]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 31]> for &'a [u8]

Source§

impl<'a> Compare<[u8; 32]> for &'a [u8]

Source§

impl<'a, 'b> Compare<&'b str> for &'a str

Source§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

Source§

impl<'a, 'b> Compare<&'b [u8; 0]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 0]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 0]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 1]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 1]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 1]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 2]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 2]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 2]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 3]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 3]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 3]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 4]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 4]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 4]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 5]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 5]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 5]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 6]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 6]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 6]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 7]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 7]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 7]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 8]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 8]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 8]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 9]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 9]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 9]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 10]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 10]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 10]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 11]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 11]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 11]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 12]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 12]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 12]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 13]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 13]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 13]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 14]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 14]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 14]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 15]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 15]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 15]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 16]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 16]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 16]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 17]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 17]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 17]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 18]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 18]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 18]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 19]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 19]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 19]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 20]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 20]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 20]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 21]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 21]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 21]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 22]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 22]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 22]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 23]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 23]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 23]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 24]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 24]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 24]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 25]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 25]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 25]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 26]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 26]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 26]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 27]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 27]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 27]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 28]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 28]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 28]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 29]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 29]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 29]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 30]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 30]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 30]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 31]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 31]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 31]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8; 32]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8; 32]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8; 32]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8]> for &'a str

Source§

fn compare(&self, t: &'b [u8]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Source§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

Source§

fn compare(&self, t: &'b [u8]) -> CompareResult

Source§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Implementors§