optional

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type O

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

func None

func None[T any]() O[T]

func With

func With[T any](value T) O[T]

func (*O[T]) Clear

func (o *O[T]) Clear()

func (O[T]) HasValue

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

func (O[T]) Or

func (o O[T]) Or(other T) T

func (*O[T]) SetValue

func (o *O[T]) SetValue(value T)

func (O[T]) Value

func (o O[T]) Value() (T, bool)

Jump to

Keyboard shortcuts

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