machine

package
v1.0.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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Await

type Await[T any] interface {
	Await(T)
}

type AwaitTry

type AwaitTry[T any] interface {
	Await(T, error)
}

type Default

type Default interface {
	GoTo() GoTo
	DontWait()
	Continue()
	Defer()
}

type GoTo

type GoTo int
const (
	GoToAwait GoTo = iota
	GoToYield
	GoToReturn
	GoToContinue
)

func (GoTo) String

func (g GoTo) String() string

type Machine

type Machine[S, T, U any] interface {
	AwaitTry[S]
	YieldTry[T]
	ReturnTry[U]
	Default
}

type Return

type Return[T any] interface {
	Return() T
}

type ReturnOpt

type ReturnOpt[T any] interface {
	Return() (T, bool)
}

type ReturnTry

type ReturnTry[T any] interface {
	Return() (T, error)
}

type Void

type Void = struct{}

type Yield

type Yield[T any] interface {
	Yield() T
}

type YieldOpt

type YieldOpt[T any] interface {
	Yield() (T, bool)
}

type YieldTry

type YieldTry[T any] interface {
	Yield() (T, error)
}

Directories

Path Synopsis
opt
try
try
try
try

Jump to

Keyboard shortcuts

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