types

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pair

type Pair[T any, U any] struct {
	// contains filtered or unexported fields
}

func NewPair

func NewPair[T any, U any](first T, second U) *Pair[T, U]

func (Pair[T, U]) First

func (t Pair[T, U]) First() T

func (Pair[T, U]) MarshalJSON

func (p Pair[T, U]) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It requires T and U to be json.Marshaler or basic types that can be marshaled.

func (Pair[T, U]) Second

func (t Pair[T, U]) Second() U

func (Pair[T, U]) String

func (p Pair[T, U]) String() string

String implements the fmt.Stringer interface. It uses fmt.Sprintf to convert the values to strings.

type Triple

type Triple[R any, T any, U any] struct {
	// contains filtered or unexported fields
}

func NewTriple

func NewTriple[R any, T any, U any](first R, second T, third U) *Triple[R, T, U]

func (Triple[R, T, U]) First

func (t Triple[R, T, U]) First() R

func (Triple[R, T, U]) MarshalJSON

func (p Triple[R, T, U]) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It requires R, T and U to be json.Marshaler or basic types that can be marshaled.

func (Triple[R, T, U]) Second

func (t Triple[R, T, U]) Second() T

func (Triple[R, T, U]) String

func (p Triple[R, T, U]) String() string

String implements the fmt.Stringer interface. It uses fmt.Sprintf to convert the values to strings.

func (Triple[R, T, U]) Third

func (t Triple[R, T, U]) Third() U

Jump to

Keyboard shortcuts

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