use std::str::{self};
use super::functions::eq_ignore_case_and_quote;
use super::types::Name;
use super::types_10::QuotedIterator;
impl std::hash::Hash for Name {
fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
self.as_bytes()
.for_each(|b| hasher.write_u8(b.to_ascii_lowercase()));
}
}
impl PartialEq for Name {
fn eq(&self, other: &Self) -> bool {
eq_ignore_case_and_quote(self.as_bytes(), other.as_bytes())
}
}
impl PartialEq<str> for Name {
fn eq(&self, other: &str) -> bool {
eq_ignore_case_and_quote(self.as_bytes(), QuotedIterator(other.bytes(), 0u8))
}
}
impl PartialEq<&str> for Name {
fn eq(&self, other: &&str) -> bool {
eq_ignore_case_and_quote(self.as_bytes(), QuotedIterator(other.bytes(), 0u8))
}
}