Hasher hashes keys and checks them for equality.
| 2230 | |
| 2231 | // Hasher hashes keys and checks them for equality. |
| 2232 | type Hasher[K any] interface { |
| 2233 | // Computes a hash for key. |
| 2234 | Hash(key K) uint32 |
| 2235 | |
| 2236 | // Returns true if a and b are equal. |
| 2237 | Equal(a, b K) bool |
| 2238 | } |
| 2239 | |
| 2240 | // NewHasher returns the built-in hasher for a given key type. |
| 2241 | func NewHasher[K any](key K) Hasher[K] { |
no outgoing calls
no test coverage detected
searching dependent graphs…