Lines Matching refs:Hash
55 let mut hash = Hash::from_bytes_fwd(&haystack[..needle.len()]); in find_with()
86 Hash::from_bytes_rev(&haystack[haystack.len() - needle.len()..]); in rfind_with()
107 hash: Hash,
119 let mut nh = NeedleHash { hash: Hash::new(), hash_2pow: 1 }; in forward()
134 let mut nh = NeedleHash { hash: Hash::new(), hash_2pow: 1 }; in reverse()
147 fn eq(&self, hash: Hash) -> bool { in eq()
155 pub(crate) struct Hash(u32); struct
157 impl Hash { impl
159 pub(crate) fn new() -> Hash { in new()
160 Hash(0) in new()
164 pub(crate) fn from_bytes_fwd(bytes: &[u8]) -> Hash { in from_bytes_fwd() argument
165 let mut hash = Hash::new(); in from_bytes_fwd()
173 fn from_bytes_rev(bytes: &[u8]) -> Hash { in from_bytes_rev() argument
174 let mut hash = Hash::new(); in from_bytes_rev()