Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiMap ¶
type BiMap[K, V comparable] struct { // contains filtered or unexported fields }
func NewBiMap ¶
func NewBiMap[K, V comparable](opts ...BiMapOption[K, V]) *BiMap[K, V]
type BiMapOption ¶
type BiMapOption[K, V comparable] interface { ApplyToBiMap(o *BiMapOptions[K, V]) }
type BiMapOptions ¶
type BiMapOptions[K, V comparable] struct { Len *int }
func (*BiMapOptions[K, V]) ApplyOptions ¶
func (o *BiMapOptions[K, V]) ApplyOptions(opts []BiMapOption[K, V]) *BiMapOptions[K, V]
func (*BiMapOptions[K, V]) ApplyToBiMap ¶
func (o *BiMapOptions[K, V]) ApplyToBiMap(o2 *BiMapOptions[K, V])
type IndexingMap ¶
type IndexingMap[K comparable, V any] struct { // contains filtered or unexported fields }
func (*IndexingMap[K, V]) AddIndex ¶
func (r *IndexingMap[K, V]) AddIndex(idx ...MapIndex[K, V])
func (*IndexingMap[K, V]) Delete ¶
func (r *IndexingMap[K, V]) Delete(k K)
func (*IndexingMap[K, V]) Get ¶
func (r *IndexingMap[K, V]) Get(k K) (V, bool)
func (*IndexingMap[K, V]) Put ¶
func (r *IndexingMap[K, V]) Put(k K, v V)
func (*IndexingMap[K, V]) Range ¶
func (r *IndexingMap[K, V]) Range(f func(K, V) bool)
type KeySlots ¶
type KeySlots[K comparable] struct { // contains filtered or unexported fields }
func NewKeySlots ¶
func NewKeySlots[K comparable](slotsPerKey uint, keys []K) *KeySlots[K]
func (*KeySlots[K]) UseNextFree ¶
type MapIndex ¶
type MapIndex[K comparable, V any] interface { Update(k K, old, new V) Put(k K, v V) Delete(k K, v V) }
type ReverseMapIndex ¶
type ReverseMapIndex[K, V comparable] map[V]sets.Set[K]
func (ReverseMapIndex[K, V]) Delete ¶
func (r ReverseMapIndex[K, V]) Delete(k K, v V)
func (ReverseMapIndex[K, V]) Get ¶
func (r ReverseMapIndex[K, V]) Get(v V) sets.Set[K]
func (ReverseMapIndex[K, V]) Put ¶
func (r ReverseMapIndex[K, V]) Put(k K, v V)
func (ReverseMapIndex[K, V]) Update ¶
func (r ReverseMapIndex[K, V]) Update(k K, old, new V)
type WithLen ¶
type WithLen[K, V comparable] int
func (WithLen[K, V]) ApplyToBiMap ¶
func (w WithLen[K, V]) ApplyToBiMap(o *BiMapOptions[K, V])
Click to show internal directories.
Click to hide internal directories.