Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keys ¶ added in v0.0.28
func Keys[K comparable, V any](m Map[K, V]) []K
func Values ¶ added in v0.0.28
func Values[K comparable, V any](m Map[K, V]) []V
Types ¶
type Map ¶ added in v0.0.28
type Map[K comparable, V any] interface { Exists(K) bool Load(K) (V, bool) LoadEq(K, func(any, any) bool) (V, bool) LoadEqs(K, func(any, any) bool) []V BatchLoad(...K) []Result[V] Store(K, V) BatchStore([]K, []V) LoadOrStore(K, V) (actual V, loaded bool) LoadAndDelete(K) (value V, loaded bool) Delete(K) BatchDelete(...K) Swap(K, V) (previous V, loaded bool) CompareAndSwap(key K, old, new V) (swapped bool) CompareAndDelete(key K, old V) (deleted bool) Range(func(key K, value V) (shouldContinue bool)) Clear() }
Click to show internal directories.
Click to hide internal directories.