option

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValueOf

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

ValueOf optional value holder

func (*ValueOf[T]) IsEq

func (val *ValueOf[T]) IsEq(other ValueOf[T], eqfT func(a, b T) bool) bool

IsEq -

func (*ValueOf[_]) IsNone

func (val *ValueOf[_]) IsNone() bool

IsNone -

func (*ValueOf[T]) Maybe

func (val *ValueOf[T]) Maybe() (T, bool)

Maybe -

func (*ValueOf[T]) Set

func (val *ValueOf[T]) Set(v T)

Set -

func (*ValueOf[T]) SomeOr

func (val *ValueOf[T]) SomeOr(defVal T) T

SomeOr -

func (ValueOf[T]) String

func (val ValueOf[T]) String() string

String - fmt.Stringer

func (*ValueOf[T]) Unset

func (val *ValueOf[T]) Unset()

Unset -

Jump to

Keyboard shortcuts

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