constraints

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback[T any] interface {
	~func() | ~func() error | ~func(T) | ~func(T) error
}

type CompareKey

type CompareKey[T comparable] interface {
	CompareKey() T
}

type ID

type ID = Key

type Key

type Key interface {
	constraints.Integer | ~string | ~[8]byte | ~[16]byte | ~[32]byte | constraints.Float //| ~[]byte
}

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

type OrderKey

type OrderKey[T constraints.Ordered] interface {
	OrderKey() T
}

comparable 只能比较是否相等,不能比较大小

type Range

type Range interface {
	constraints.Ordered | time.Time | ~*time.Time | ~string
}

Jump to

Keyboard shortcuts

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