Documentation ¶
Index ¶
- func MapAllF[K comparable, V any, U any](m *Map[K, V], f func(map[K]V) U) U
- type Map
- func (m *Map[K, V]) Clone() map[K]V
- func (m *Map[K, V]) Delete(k K) V
- func (m *Map[K, V]) DeleteAll(ks ...K)
- func (m *Map[K, V]) DeleteAllDeref(ks ...*K)
- func (m *Map[K, V]) DeleteDeref(k *K) V
- func (m *Map[K, V]) Get(k K) V
- func (m *Map[K, V]) Length() int
- func (m *Map[K, V]) Replace(nm map[K]V)
- func (m *Map[K, V]) Set(k K, v V)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
Map implements a Map with atomic semantics.
func (*Map[K, V]) Delete ¶
func (m *Map[K, V]) Delete(k K) V
Delete will remove the key and return its value.
func (*Map[K, V]) DeleteAll ¶
func (m *Map[K, V]) DeleteAll(ks ...K)
DeleteAllDeref will dereferences and removes the keys.
func (*Map[K, V]) DeleteAllDeref ¶
func (m *Map[K, V]) DeleteAllDeref(ks ...*K)
DeleteAll will remove the keys.
func (*Map[K, V]) DeleteDeref ¶
func (m *Map[K, V]) DeleteDeref(k *K) V
DeleteDeref will dereference and remove the key and return its value.
func (*Map[K, V]) Get ¶
func (m *Map[K, V]) Get(k K) V
Get atomically retrieves an element from the Map.
Click to show internal directories.
Click to hide internal directories.