option

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 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 None

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

func Some

func Some[T any](value T) Option[T]

func (Option[T]) IsNone

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

func (Option[T]) IsSome

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

func (Option[T]) Unwrap

func (option Option[T]) Unwrap() T

func (Option[T]) UnwrapOr

func (option Option[T]) UnwrapOr(callback func() T) T

Jump to

Keyboard shortcuts

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