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

Function newMapValueNode

immutable.go:1241–1247  ·  view source on GitHub ↗

newMapValueNode returns a new instance of mapValueNode.

(keyHash uint32, key K, value V)

Source from the content-addressed store, hash-verified

1239
1240// newMapValueNode returns a new instance of mapValueNode.
1241func newMapValueNode[K, V any](keyHash uint32, key K, value V) *mapValueNode[K, V] {
1242 return &mapValueNode[K, V]{
1243 keyHash: keyHash,
1244 key: key,
1245 value: value,
1246 }
1247}
1248
1249// keyHashValue returns the key hash for this node.
1250func (n *mapValueNode[K, V]) keyHashValue() uint32 {

Callers 3

setMethod · 0.85
mergeIntoNodeFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…