Documentation
¶
Index ¶
- type RWMap
- func (m *RWMap[K, V]) Clear()
- func (m *RWMap[K, V]) Copy() *RWMap[K, V]
- func (m *RWMap[K, V]) Delete(key K)
- func (m *RWMap[K, V]) Get(key K) (V, bool)
- func (m *RWMap[K, V]) Has(key K) bool
- func (m *RWMap[K, V]) Keys() []K
- func (m *RWMap[K, V]) Len() int
- func (m *RWMap[K, V]) Set(key K, value V)
- func (m *RWMap[K, V]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RWMap ¶
type RWMap[K comparable, V any] struct { // contains filtered or unexported fields }
func New ¶
func New[K comparable, V any]() *RWMap[K, V]
func (*RWMap[K, V]) Delete ¶
func (m *RWMap[K, V]) Delete(key K)
Delete deletes the value associated with the given key locking until the map is available for writing.
func (*RWMap[K, V]) Get ¶
Get returns the value associated with the given key, and a bool indicating whether the key was found.
func (*RWMap[K, V]) Keys ¶
func (m *RWMap[K, V]) Keys() []K
Keys returns a slice of all keys in the map.
Click to show internal directories.
Click to hide internal directories.