Versions in this module Expand all Collapse all v0 v0.1.0 Jul 11, 2023 Changes in this version + func LoadOrElse(m Map[K, V], k K, vFn func(K) V) V + func NativeCompare(a, b T) int + type Cache interface + Acquire func(context.Context, K) *V + Delete func(K) + Flush func(context.Context) + Release func(K) + func NewARCache(cap int, src Source[K, V]) Cache[K, V] + func NewLRUCache(cap int, src Source[K, V]) Cache[K, V] + type Color bool + const Black + const Red + type IntervalTree struct + MaxFn func(V) K + MinFn func(V) K + func (t *IntervalTree[K, V]) Equal(u *IntervalTree[K, V]) bool + func (t *IntervalTree[K, V]) Insert(val V) + func (t *IntervalTree[K, V]) Max() (K, bool) + func (t *IntervalTree[K, V]) Min() (K, bool) + func (t *IntervalTree[K, V]) Range(fn func(V) bool) + func (t *IntervalTree[K, V]) Search(fn func(K) int) (V, bool) + func (t *IntervalTree[K, V]) Subrange(rangeFn func(K) int, handleFn func(V) bool) + type LinkedList struct + Len int + Newest *LinkedListEntry[T] + Oldest *LinkedListEntry[T] + func (l *LinkedList[T]) Delete(entry *LinkedListEntry[T]) + func (l *LinkedList[T]) IsEmpty() bool + func (l *LinkedList[T]) MoveToNewest(entry *LinkedListEntry[T]) + func (l *LinkedList[T]) Store(entry *LinkedListEntry[T]) + type LinkedListEntry struct + List *LinkedList[T] + Newer *LinkedListEntry[T] + Older *LinkedListEntry[T] + Value T + type Map interface + Delete func(K) + Has func(K) bool + Len func() int + Load func(K) (V, bool) + Store func(K, V) + type NativeOrdered struct + Val T + func (a NativeOrdered[T]) Compare(b NativeOrdered[T]) int + type Optional struct + OK bool + Val T + func OptionalNil() Optional[T] + func OptionalValue(val T) Optional[T] + func (o *Optional[T]) UnmarshalJSON(dat []byte) error + func (o Optional[T]) MarshalJSON() ([]byte, error) + type Ordered _Ordered[T] + type RBNode struct + Color Color + Left *RBNode[T] + Parent *RBNode[T] + Right *RBNode[T] + Value T + func (cur *RBNode[T]) Next() *RBNode[T] + func (cur *RBNode[T]) Prev() *RBNode[T] + type RBTree struct + AttrFn func(*RBNode[T]) + func (t *RBTree[T]) Delete(nodeToDelete *RBNode[T]) + func (t *RBTree[T]) Equal(u *RBTree[T]) bool + func (t *RBTree[T]) Insert(val T) + func (t *RBTree[T]) Len() int + func (t *RBTree[T]) Max() *RBNode[T] + func (t *RBTree[T]) Min() *RBNode[T] + func (t *RBTree[T]) Range(fn func(*RBNode[T]) bool) + func (t *RBTree[T]) Search(fn func(T) int) *RBNode[T] + func (t *RBTree[T]) Subrange(rangeFn func(T) int, handleFn func(*RBNode[T]) bool) + type RangeMap interface + Range func(func(K, V) bool) + type Set map[T]struct + func NewSet(values ...T) Set[T] + func (a Set[T]) HasAny(b Set[T]) bool + func (o *Set[T]) DecodeJSON(r io.RuneScanner) error + func (o Set[T]) Delete(v T) + func (o Set[T]) DeleteFrom(p Set[T]) + func (o Set[T]) EncodeJSON(w io.Writer) error + func (o Set[T]) Has(v T) bool + func (o Set[T]) Insert(v T) + func (o Set[T]) InsertFrom(p Set[T]) + func (o Set[T]) TakeOne() T + func (small Set[T]) Intersection(big Set[T]) Set[T] + type SlicePool struct + func (p *SlicePool[T]) Get(size int) []T + func (p *SlicePool[T]) Put(slice []T) + type SortedMap struct + func (m *SortedMap[K, V]) Delete(key K) + func (m *SortedMap[K, V]) Has(key K) bool + func (m *SortedMap[K, V]) Len() int + func (m *SortedMap[K, V]) Load(key K) (value V, ok bool) + func (m *SortedMap[K, V]) Range(fn func(key K, value V) bool) + func (m *SortedMap[K, V]) Search(fn func(K, V) int) (K, V, bool) + func (m *SortedMap[K, V]) Store(key K, value V) + func (m *SortedMap[K, V]) Subrange(rangeFn func(K, V) int, handleFn func(K, V) bool) + type Source interface + Flush func(context.Context, *V) + Load func(context.Context, K, *V) + type SourceFunc func(context.Context, K, *V) + func (SourceFunc[K, V]) Flush(context.Context, *V) + func (fn SourceFunc[K, V]) Load(ctx context.Context, k K, v *V) + type SubrangeMap interface + Subrange func(rangeFn func(K, V) int, handleFn func(K, V) bool)