result

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type[T any] either.Type[T, error]

func Error

func Error[T any](err error) Type[T]

func Map

func Map[T, U any](r Type[T], f func(T) U) Type[U]

func MapError

func MapError[T any](r Type[T], f func(err error) error) Type[T]

func New

func New[T any](v T) Type[T]

func (Type[T]) IsError

func (s Type[T]) IsError() bool

func (Type[T]) MapError

func (s Type[T]) MapError(f func(err error) error) Type[T]

func (Type[T]) Unwrap

func (s Type[T]) Unwrap() (T, error)

Jump to

Keyboard shortcuts

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