Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Map ¶
type Map[K comparable] interface { Load(key K) (value any, ok bool) Store(key K, value any) LoadOrStore(key K, value any) (actual any, loaded bool) LoadAndDelete(key K) (value any, loaded bool) Delete(key K) Swap(key K, value any) (previous any, loaded bool) CompareAndSwap(key K, old, new any) bool CompareAndDelete(key K, old any) (deleted bool) Range(f func(key K, value any) bool) }
func NewMapAny ¶
func NewMapAny[K comparable]() Map[K]
type MapTyped ¶
type MapTyped[K comparable, V any] interface { Load(key K) (value V, ok bool) Store(key K, value V) LoadOrStore(key K, value V) (actual V, loaded bool) LoadAndDelete(key K) (value V, loaded bool) Delete(key K) Swap(key K, value V) (previous V, loaded bool) CompareAndSwap(key K, old, new V) bool CompareAndDelete(key K, old V) (deleted bool) Range(f func(key K, value V) bool) }
func NewMapTyped ¶
func NewMapTyped[K comparable, V any]() MapTyped[K, V]
Click to show internal directories.
Click to hide internal directories.