result

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Iter

func Iter[T any](r R[T], f func(T)) error

Types

type R

type R[T any] interface {
	GetError() error
	GetResult() T
	IsErr() bool
	IsOk() bool
	Unwrap() (T, error)
}

func Map

func Map[A, B any](r R[A], f func(A) B) R[B]

func Of

func Of[T any](v T) R[T]

func OfErr

func OfErr[T any](err error) R[T]

Jump to

Keyboard shortcuts

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