value

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T any](a, b T) bool

func EqualFuncFor

func EqualFuncFor[T any]() func(a, b T) bool

EqualFunc returns an equality tester optimised for T.

Types

type Equaler

type Equaler[T any] interface {
	Equal(t T) bool
}

Equaler supports equality comparison with values of the same type.

type Key

type Key[T any] interface {
	Equaler[T]
	hash.Hashable
}

Key represents a type that can be used as a key in a Map or a Set.

type Samer

type Samer interface {
	Same(a any) bool
}

Samer supports equality comparison with values of any type. It is the non-generic counterpart of Equaler.

Jump to

Keyboard shortcuts

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