optional

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Optional

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

func Empty

func Empty[T any]() Optional[T]

func Of

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

func WrapString

func WrapString[T ~string](value T) Optional[T]

func (Optional[T]) HasValue

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

func (Optional[T]) IsEmpty

func (o Optional[T]) IsEmpty() bool

func (Optional[T]) Value

func (o Optional[T]) Value() T

Jump to

Keyboard shortcuts

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