Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Maker ¶
Maker is a factory function for creating a Store.
func MappedMaker ¶
func MappedMaker[K comparable, V any]() Maker[K, V]
MappedMaker returns a Maker that calls NewMapped. The key type K must be comparable.
type Store ¶
type Store[K, V any] interface { Size() int Get(key K) opt.Optional[V] Put(key K, value V) ForEach(func(key K, value V) bool) ForEachKey(func(key K) bool) }
Store represents a container of key-value pairs. Used internally for key-grouping and key-joining operations.
func NewMapped ¶
func NewMapped[K comparable, V any]() Store[K, V]
NewMapped creates a new Store backed by a map. The key type K must be comparable.
Click to show internal directories.
Click to hide internal directories.