Documentation ¶
Index ¶
- type Dict
- func (slf *Dict[K, V]) Delete(k K)
- func (slf *Dict[K, V]) Exist(key K) bool
- func (slf *Dict[K, V]) ForEach(f func(K, V))
- func (slf *Dict[K, V]) Get(k K) (V, bool)
- func (slf *Dict[K, V]) Keys() []K
- func (slf *Dict[K, V]) Len() int
- func (slf *Dict[K, V]) Map() map[K]V
- func (slf *Dict[K, V]) MarshalJSON() ([]byte, error)
- func (slf *Dict[K, V]) Set(k K, v V)
- func (slf *Dict[K, V]) UnmarshalJSON(bytes []byte) error
- func (slf *Dict[K, V]) Values() []V
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dict ¶
type Dict[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Dict[K, V]) MarshalJSON ¶
func (*Dict[K, V]) UnmarshalJSON ¶
type Option ¶
type Option[K comparable, V any] func(*Dict[K, V])
func WithSource ¶
func WithSource[K comparable, V any](source map[K]V) Option[K, V]
Click to show internal directories.
Click to hide internal directories.