options

package
v0.0.0-...-36d8597 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 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 Option

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

func New

func New[T any]() *Option[T]

func (Option[T]) Apply

func (o Option[T]) Apply() T

func (*Option[T]) Clear

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

func (Option[T]) IsNone

func (o Option[T]) IsNone() bool

func (Option[T]) IsSome

func (o Option[T]) IsSome() bool

func (*Option[T]) Set

func (o *Option[T]) Set(val T)

func (Option[T]) Take

func (o Option[T]) Take() (T, error)

type OptionError

type OptionError struct{}

func (OptionError) Error

func (o OptionError) Error() string

Jump to

Keyboard shortcuts

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