constraints

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package constraints provides generic constraints for use with the collection package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparator

type Comparator[T any] interface {
	Compare(T, T) int
}

Comparator is a constraint for a type that can compare two values of type T.

type Ordered

type Ordered[T any] interface {
	Compare(T) int
}

Ordered is a constraint for types that define their own ordering via a Compare() method.

Jump to

Keyboard shortcuts

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