MCPcopy Create free account
hub / github.com/benbjohnson/immutable / Hasher

Interface Hasher

immutable.go:2232–2238  ·  view source on GitHub ↗

Hasher hashes keys and checks them for equality.

Source from the content-addressed store, hash-verified

2230
2231// Hasher hashes keys and checks them for equality.
2232type 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.
2241func NewHasher[K any](key K) Hasher[K] {

Callers 12

testNewHasherFunction · 0.95
GetMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65
testNewHasherFunction · 0.95
indexOfMethod · 0.65
getMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…