undefinedable

package
v0.0.0-...-fd0b456 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Undefinedable

type Undefinedable[T any] struct {
	option.Option[T]
}

func Defined

func Defined[T any](v T) Undefinedable[T]

func FromPointer

func FromPointer[T any](v *T) Undefinedable[T]

FromPointer converts *T into Undefinedable[T]. If v is nil, it returns an undefined Undefinedable. Otherwise, v is copied by assignment.

func Undefined

func Undefined[T any]() Undefinedable[T]

func (Undefinedable[T]) Equal

func (f Undefinedable[T]) Equal(other Undefinedable[T]) bool

func (Undefinedable[T]) IsDefined

func (u Undefinedable[T]) IsDefined() bool

func (Undefinedable[T]) IsUndefined

func (u Undefinedable[T]) IsUndefined() bool

Jump to

Keyboard shortcuts

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