enum

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enum

type Enum[T any] struct {
	// contains filtered or unexported fields
}

func Default

func Default[T any]() Enum[T]

func FromID

func FromID[T any](id int) Enum[T]

func FromStr

func FromStr[T any](str string) Enum[T]

func New

func New[T any](id int, val string) Enum[T]

func (Enum[T]) ID

func (e Enum[T]) ID() int

func (Enum[T]) String

func (e Enum[T]) String() string

Jump to

Keyboard shortcuts

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