enum

package
v0.4.112 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnumItemImpl

func NewEnumItemImpl[K constraints.Ordered, V any](value V, key K, full string) (item parl.EnumItem[K, V])

Types

type EnumItemImpl

type EnumItemImpl[K constraints.Ordered, V any] struct {
	ValueV V
	KeyK   K      // key that maps to this enumeration value
	Full   string // sentence describing this flag
}

EnumItemImpl is an value or flag-value item of an enumeration container.

  • K is the type of a unique key mapping one-to-one to an enumeration value
  • V is the type of the internally used value representation

func (*EnumItemImpl[K, V]) Description

func (item *EnumItemImpl[K, V]) Description() (desc string)

func (*EnumItemImpl[K, V]) Key

func (item *EnumItemImpl[K, V]) Key() (key K)

func (*EnumItemImpl[K, V]) String

func (item *EnumItemImpl[K, V]) String() (s string)

func (*EnumItemImpl[K, V]) Value

func (item *EnumItemImpl[K, V]) Value() (value V)

Jump to

Keyboard shortcuts

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