Documentation
¶
Index ¶
- Constants
- type M
- func (s *M[K, V]) Collect(seq iter.Seq2[K, V]) *M[K, V]
- func (s *M[K, V]) CopyFromMap(data map[K]V)
- func (s *M[K, V]) Delete(key K)
- func (s *M[K, V]) Empty() bool
- func (s *M[K, V]) Get(key K) (value V, exist bool)
- func (s *M[K, V]) GetAndDelete(key K) (value V, exist bool)
- func (s *M[K, V]) GetMust(key K) (value V)
- func (s *M[K, V]) GetMustCallback(key K, callback func(value V) V) (value V)
- func (s *M[K, V]) Has(key K) (exists bool)
- func (s *M[K, V]) Keys() []K
- func (s *M[K, V]) LastKey() K
- func (s *M[K, V]) LastValue() V
- func (s *M[K, V]) Len() int
- func (s *M[K, V]) Lock()
- func (s *M[K, V]) Map() map[K]V
- func (s *M[K, V]) MarshalJSON() (data []byte, err error)
- func (s *M[K, V]) RLock()
- func (s *M[K, V]) RUnlock()
- func (s *M[K, V]) Range() iter.Seq2[K, V]
- func (s *M[K, V]) RangeKeys() iter.Seq[K]
- func (s *M[K, V]) Remove(key K)
- func (s *M[K, V]) Reset()
- func (s *M[K, V]) Set(key K, value V) (actual V, exist bool)
- func (s *M[K, V]) String() string
- func (s *M[K, V]) Unlock()
- func (s *M[K, V]) UnmarshalJSON(data []byte) (err error)
- func (s *M[K, V]) Update(key K, value V)
- func (s *M[K, V]) Values() []V
Constants ¶
View Source
const Ordered = true
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type M ¶
type M[K comparable, V any] struct { // contains filtered or unexported fields }
func NewOrdered ¶
func NewOrdered[K comparable, V any](yield iter.Seq2[K, V]) (m *M[K, V])
func (*M[K, V]) CopyFromMap ¶
func (s *M[K, V]) CopyFromMap(data map[K]V)
func (*M[K, V]) GetAndDelete ¶
func (*M[K, V]) GetMustCallback ¶
func (s *M[K, V]) GetMustCallback(key K, callback func(value V) V) (value V)
func (*M[K, V]) MarshalJSON ¶
func (*M[K, V]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.