typemap

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllKeyValues added in v0.0.7

type AllKeyValues[T any, K any, V any] interface {
	AllKeyValues(T) iter.Seq2[K, V]
}

type AllKeys

type AllKeys[T any, K any] interface {
	AllKeys(T) iter.Seq[K]
}

type AllValues

type AllValues[T any, V any] interface {
	AllValues(T) iter.Seq[V]
}

type Compare

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

type DefaultCompare added in v0.0.5

type DefaultCompare[T comparable] struct{}

func (DefaultCompare[T]) Compare added in v0.0.5

func (d DefaultCompare[T]) Compare(a, b T) bool

type DefaultOrder added in v0.0.5

type DefaultOrder[T cmp.Ordered] struct{}

func (DefaultOrder[T]) Order added in v0.0.5

func (d DefaultOrder[T]) Order(a, b T) int

type Deref added in v0.0.9

type Deref[T any] interface {
	Deref(*T) T
}

type Float32 added in v0.0.5

type Float32 = FloatLike[float32]

type Float64 added in v0.0.5

type Float64 = FloatLike[float64]

type FloatLike added in v0.0.5

type FloatLike[T ~float32 | ~float64] struct {
	StringFunc[T]
	DefaultCompare[T]
	DefaultOrder[T]
}

type ForInt added in v0.0.5

type ForInt = ForIntegerLike[int]

type ForInt16 added in v0.0.5

type ForInt16 = ForIntegerLike[int16]

type ForInt32 added in v0.0.5

type ForInt32 = ForIntegerLike[int32]

type ForInt64 added in v0.0.5

type ForInt64 = ForIntegerLike[int64]

type ForInt8 added in v0.0.5

type ForInt8 = ForIntegerLike[int8]

type ForIntegerLike added in v0.0.5

type ForIntegerLike[T ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr] struct {
	StringFunc[T]
	DefaultCompare[T]
	DefaultOrder[T]
}

type ForMap added in v0.0.5

type ForMap[K comparable, V any] = ForMapLike[map[K]V, K, V]

type ForMapLike added in v0.0.5

type ForMapLike[T ~map[K]V, K comparable, V any] struct {
	StringFunc[T]
}

func (ForMapLike[T, K, V]) AllKeyValues added in v0.0.7

func (m ForMapLike[T, K, V]) AllKeyValues(v T) iter.Seq2[K, V]

func (ForMapLike[T, K, V]) AllKeys added in v0.0.5

func (m ForMapLike[T, K, V]) AllKeys(v T) iter.Seq[K]

func (ForMapLike[T, K, V]) AllValues added in v0.0.5

func (m ForMapLike[T, K, V]) AllValues(v T) iter.Seq[V]

func (ForMapLike[T, K, V]) GetValue added in v0.0.5

func (m ForMapLike[T, K, V]) GetValue(v T, k K) (V, bool)

func (ForMapLike[T, K, V]) HasKey added in v0.0.5

func (m ForMapLike[T, K, V]) HasKey(v T, k K) bool

func (ForMapLike[T, K, V]) IsNil added in v0.0.5

func (m ForMapLike[T, K, V]) IsNil(v T) bool

func (ForMapLike[T, K, V]) Length added in v0.0.5

func (m ForMapLike[T, K, V]) Length(v T) int

func (ForMapLike[T, K, V]) ToString added in v0.0.5

func (m ForMapLike[T, K, V]) ToString(v T) string

type ForPointer added in v0.0.9

type ForPointer[T any] struct {
	StringFunc[*T]
}

func (ForPointer[T]) Compare added in v0.0.9

func (_ ForPointer[T]) Compare(a, b *T) bool

func (ForPointer[T]) Deref added in v0.0.9

func (_ ForPointer[T]) Deref(v *T) T

func (ForPointer[T]) IsNil added in v0.0.9

func (_ ForPointer[T]) IsNil(v *T) bool

type ForSlice added in v0.0.5

type ForSlice[E any] = ForSliceLike[[]E, E]

type ForSliceLike added in v0.0.5

type ForSliceLike[T ~[]E, E any] struct {
	StringFunc[T]
}

func (ForSliceLike[T, E]) AllKeyValues added in v0.0.7

func (s ForSliceLike[T, E]) AllKeyValues(v T) iter.Seq2[int, E]

func (ForSliceLike[T, E]) AllKeys added in v0.0.5

func (s ForSliceLike[T, E]) AllKeys(v T) iter.Seq[int]

func (ForSliceLike[T, E]) AllValues added in v0.0.5

func (s ForSliceLike[T, E]) AllValues(v T) iter.Seq[E]

func (ForSliceLike[T, E]) GetValue added in v0.0.5

func (s ForSliceLike[T, E]) GetValue(v T, k int) (E, bool)

func (ForSliceLike[T, E]) HasKey added in v0.0.5

func (s ForSliceLike[T, E]) HasKey(v T, k int) bool

func (ForSliceLike[T, E]) IsNil added in v0.0.5

func (s ForSliceLike[T, E]) IsNil(v T) bool

func (ForSliceLike[T, E]) Length added in v0.0.5

func (s ForSliceLike[T, E]) Length(v T) int

func (ForSliceLike[T, E]) ToString added in v0.0.5

func (s ForSliceLike[T, E]) ToString(v T) string

type ForString added in v0.0.5

type ForString = ForStringLike[string]

type ForStringLike added in v0.0.5

type ForStringLike[T ~string] struct {
	StringFunc[T]
	DefaultCompare[T]
	DefaultOrder[T]
}

func (ForStringLike[T]) AllKeyValues added in v0.0.7

func (s ForStringLike[T]) AllKeyValues(v T) iter.Seq2[int, rune]

func (ForStringLike[T]) AllKeys added in v0.0.7

func (s ForStringLike[T]) AllKeys(v T) iter.Seq[int]

func (ForStringLike[T]) AllValues added in v0.0.7

func (s ForStringLike[T]) AllValues(v T) iter.Seq[rune]

func (ForStringLike[T]) GetValue added in v0.0.7

func (s ForStringLike[T]) GetValue(v T, key int) (rune, bool)

func (ForStringLike[T]) HasKey added in v0.0.7

func (s ForStringLike[T]) HasKey(v T, key int) bool

func (ForStringLike[T]) Length added in v0.0.5

func (s ForStringLike[T]) Length(v T) int

type ForUint added in v0.0.5

type ForUint = ForIntegerLike[uint]

type ForUint16 added in v0.0.5

type ForUint16 = ForIntegerLike[uint16]

type ForUint32 added in v0.0.5

type ForUint32 = ForIntegerLike[uint32]

type ForUint64 added in v0.0.5

type ForUint64 = ForIntegerLike[uint64]

type ForUint8 added in v0.0.5

type ForUint8 = ForIntegerLike[uint8]

type ForUintptr added in v0.0.5

type ForUintptr = ForIntegerLike[uintptr]

type GetValue

type GetValue[T any, K any, V any] interface {
	GetValue(T, K) (V, bool)
}

type HasKey

type HasKey[T any, K any] interface {
	HasKey(T, K) bool
}

type IsNil

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

type Length

type Length[T any] interface {
	Length(T) int
}

type Order

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

type String

type String[T any] interface {
	String(T) string
}

type StringFunc added in v0.0.5

type StringFunc[T any] func(T) string

func (StringFunc[T]) String added in v0.0.5

func (f StringFunc[T]) String(v T) string

Jump to

Keyboard shortcuts

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