Documentation
¶
Index ¶
- type LinkedMap
- func (m *LinkedMap[K, V]) Entries() []struct{ ... }
- func (m *LinkedMap[K, V]) Get(key K) (V, bool)
- func (m *LinkedMap[K, V]) Keys() []K
- func (m *LinkedMap[K, V]) Len() int
- func (m *LinkedMap[K, V]) Range(fn func(K, V))
- func (m *LinkedMap[K, V]) Set(key K, value V)
- func (m *LinkedMap[K, V]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkedMap ¶
type LinkedMap[K comparable, V any] struct { // contains filtered or unexported fields }
LinkedMap is a map that preserves insertion order of keys.
func (*LinkedMap[K, V]) Entries ¶
func (m *LinkedMap[K, V]) Entries() []struct { Key K Value V }
Entries returns slice of key/value pairs in insertion order
func (*LinkedMap[K, V]) Keys ¶
func (m *LinkedMap[K, V]) Keys() []K
Keys returns keys in insertion order. A copy of the keys slice is returned to prevent external modification.
func (*LinkedMap[K, V]) Range ¶
func (m *LinkedMap[K, V]) Range(fn func(K, V))
Range iterates over entries in insertion order
Click to show internal directories.
Click to hide internal directories.