result

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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
	GetValue() T
	IsErr() bool
	IsOk() bool
	Unwrap() (T, error)
}

func Err added in v0.0.22

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

func Map

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

func Ok added in v0.0.22

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

Jump to

Keyboard shortcuts

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