Documentation
¶
Overview ¶
Package opt provides utilities for optional types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T[D any] struct { // Specified indicates whether Value can be used. Specified bool // Value holds the actual value. Value D }
func FromPtr ¶ added in v0.4.0
FromPtr returns an optional T value which is specified depending on whether the pointer can be dereferenced or not.
func Unspecified ¶
Unspecified returns an unspecified value of the generic type.
Click to show internal directories.
Click to hide internal directories.