optional

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package optional contains primitive types and ui types that can have an unspecified state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	Specified bool
	Value     bool
}

Bool represents an optional bool value.

func NewBool

func NewBool(value bool) Bool

NewBool returns a specified Bool value.

type Color

type Color struct {
	Specified bool
	Value     ui.Color
}

Color represents an optional ui Color value.

func NewColor

func NewColor(value ui.Color) Color

NewColor returns a specified Color value.

type Int

type Int struct {
	Specified bool
	Value     int
}

Int represents an optional int value.

func NewInt

func NewInt(value int) Int

NewInt returns a specified Int value.

type Size added in v0.3.0

type Size struct {
	Specified bool
	Value     ui.Size
}

Size represents an optional ui Size value.

func NewSize added in v0.3.0

func NewSize(value ui.Size) Size

NewSize returns a specified Size value.

type Spacing

type Spacing struct {
	Specified bool
	Value     ui.Spacing
}

Spacing represents an optional ui Spacing value.

func NewSpacing

func NewSpacing(value ui.Spacing) Spacing

NewSpacing returns a specified Spacing value.

type String

type String struct {
	Specified bool
	Value     string
}

String represents an optional string value.

func NewString

func NewString(value string) String

NewString returns a specified String value.

Jump to

Keyboard shortcuts

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