Documentation ¶
Overview ¶
Package hashmap implements a generic wrapper around a built in map type which allows interface types like PublicKeyHash to be used as map keys
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashMap ¶
type HashMap[H tz.Comparable[K], K tz.ToComparable[H, K], V any] map[H]V
HashMap is a wrapper around a built in map type which allows interface types like gotez.PublicKeyHash to be used as map keys
func New ¶
func New[H tz.Comparable[K], K tz.ToComparable[H, K], V any](init []KV[K, V]) HashMap[H, K, V]
type PublicKeyHashMap ¶
type PublicKeyHashMap[V any] HashMap[tz.EncodedPublicKeyHash, tz.PublicKeyHash, V]
PublicKeyHashMap is a shortcut for a map with gotez.PublicKeyHash keys
func NewPublicKeyHashMap ¶
func NewPublicKeyHashMap[V any](init []PublicKeyKV[V]) PublicKeyHashMap[V]
func (PublicKeyHashMap[V]) ForEach ¶
func (m PublicKeyHashMap[V]) ForEach(cb func(key tz.PublicKeyHash, val V) bool) bool
func (PublicKeyHashMap[V]) Get ¶
func (m PublicKeyHashMap[V]) Get(key tz.PublicKeyHash) (V, bool)
func (PublicKeyHashMap[V]) Insert ¶
func (m PublicKeyHashMap[V]) Insert(key tz.PublicKeyHash, val V) (V, bool)
type PublicKeyKV ¶
type PublicKeyKV[V any] KV[tz.PublicKeyHash, V]
Click to show internal directories.
Click to hide internal directories.