gen

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator added in v0.0.22

type Generator[I, O any] interface {
	Gen(context.Context, I, O) error
}

func New added in v0.0.22

func New[I, O any](g GeneratorFunc[I, O]) Generator[I, O]

type GeneratorFunc

type GeneratorFunc[I, O any] func(context.Context, I, O) error

func MapI

func MapI[A, B, Output any](x GeneratorFunc[A, Output], f func(B) result.R[A]) GeneratorFunc[B, Output]

func MapO

func MapO[A, B, Input any](x GeneratorFunc[Input, A], f func(B) result.R[A]) GeneratorFunc[Input, B]

func (GeneratorFunc[I, O]) Gen added in v0.0.22

func (f GeneratorFunc[I, O]) Gen(ctx context.Context, input I, output O) error

Jump to

Keyboard shortcuts

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