optional

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Of

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

func New

func New[T any](value T, valid bool) Of[T]

func NewWithValue

func NewWithValue[T any](value T) Of[T]

func (Of[T]) HasValue

func (o Of[T]) HasValue() bool

func (Of[T]) MarshalJSON

func (o Of[T]) MarshalJSON() ([]byte, error)

func (Of[T]) ValueOrZero

func (o Of[T]) ValueOrZero() T

Jump to

Keyboard shortcuts

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