optional

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: Apache-2.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type[T any] interface {
	Set(T)
	Get() T
	Erase() bool
	IsNil() bool
}

type Value

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

func (*Value[T]) Erase

func (o *Value[T]) Erase() (ret bool)

func (*Value[T]) Get

func (o *Value[T]) Get() T

func (*Value[T]) HasValue

func (o *Value[T]) HasValue() bool

func (*Value[T]) IsNil

func (o *Value[T]) IsNil() bool

func (*Value[T]) Set

func (o *Value[T]) Set(v T)

Jump to

Keyboard shortcuts

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