Documentation
¶
Index ¶
- type Map
- type Set
- func (set Set[T]) Add(v T)
- func (set Set[T]) Clear()
- func (set Set[T]) Contains(v T) bool
- func (set Set[T]) IsEmpty() bool
- func (set Set[T]) Range(f func(T) bool)
- func (set Set[T]) RangeAll(f func(T))
- func (set Set[T]) RangeAllParallel(f func(T))
- func (set Set[T]) Remove(v T)
- func (set Set[T]) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[KT comparable, VT any] struct { *xsync.MapOf[KT, VT] }
func NewMapFrom ¶
func NewMapFrom[KT comparable, VT any](m map[KT]VT) (res Map[KT, VT])
func NewMapOf ¶
func NewMapOf[KT comparable, VT any](options ...func(*xsync.MapConfig)) Map[KT, VT]
func (Map[KT, VT]) CollectErrors ¶
CollectErrors calls the given function for each key-value pair in the map, then returns a slice of errors collected.
func (Map[KT, VT]) RangeAll ¶
func (m Map[KT, VT]) RangeAll(do func(k KT, v VT))
RangeAll calls the given function for each key-value pair in the map.
Parameters:
do: function to call for each key-value pair
Returns:
nothing
func (Map[KT, VT]) RangeAllParallel ¶
func (m Map[KT, VT]) RangeAllParallel(do func(k KT, v VT))
RangeAllParallel calls the given function for each key-value pair in the map, in parallel. The map is not safe for modification from within the function.
Parameters:
do: function to call for each key-value pair
Returns:
nothing
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[T comparable]() Set[T]
func (Set[T]) RangeAllParallel ¶
func (set Set[T]) RangeAllParallel(f func(T))
Click to show internal directories.
Click to hide internal directories.