collections

package
v0.0.0-...-381c4e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBitsetIdx = 100_000
)

Variables

View Source
var (
	ErrNilPointer        = errors.New("nil pointer")
	ErrExists            = errors.New("exists")
	MakeErrStopIteration = iter.MakeErrStopIteration
	ErrNotFound          = errNotFound("not found")
)

Functions

func IsErrNotFound

func IsErrNotFound(err error) bool

func MakeErrNotFound

func MakeErrNotFound(value schnittstellen.Stringer) error

func MakeErrNotFoundString

func MakeErrNotFoundString(s string) error

func MakeKey

func MakeKey(ss ...fmt.Stringer) string

func MakeTryFinally

func MakeTryFinally[T any](
	try schnittstellen.FuncIter[T],
	finally schnittstellen.FuncIter[T],
) schnittstellen.FuncIter[T]

TODO-P3 move to iter

func MakeWriterNoop

func MakeWriterNoop[T any]() schnittstellen.FuncIter[T]

TODO-P3 move to iter

func WriterContainer

func WriterContainer[T schnittstellen.Element](
	s schnittstellen.SetLike[T],
	sigil error,
) schnittstellen.FuncIter[T]

Types

type Bitset

type Bitset interface {
	Equals(Bitset) bool
	Len() int
	Cap() int
	Get(int) bool
	CountOn() int
	CountOff() int
	EachOn(schnittstellen.FuncIter[int]) error
	EachOff(schnittstellen.FuncIter[int]) error

	Add(int)
	Del(int)
	DelIfPresent(int)
	// contains filtered or unexported methods
}

func MakeBitset

func MakeBitset(n int) Bitset

func MakeBitsetOn

func MakeBitsetOn(n int) Bitset

type ErrEmptyKey

type ErrEmptyKey[T any] struct {
	Element T
}

func (ErrEmptyKey[T]) Error

func (e ErrEmptyKey[T]) Error() string

func (ErrEmptyKey[T]) Is

func (e ErrEmptyKey[T]) Is(target error) (ok bool)

type KeyFunc

type KeyFunc[T any] func(T) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL