convertto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(value any) types.Result[string]

func Pointer

func Pointer[T any](value T) *T

func PrettyJSON

func PrettyJSON(value any) types.Result[string]

func ResultToErrorOption

func ResultToErrorOption[T any](result types.Result[T]) (option types.Option[error])

func Value

func Value[T any](pointer *T) T

Types

type OptionTypeConverter

type OptionTypeConverter[T1 any, T2 any] interface {
	Then(call func(T1) types.Option[T2]) types.Option[T2]
}

func OptionType

func OptionType[T1 any, T2 any](option types.Option[T1]) OptionTypeConverter[T1, T2]

type ResultTypeConverter

type ResultTypeConverter[T1 any, T2 any] interface {
	Then(call func(T1) types.Result[T2]) types.Result[T2]
}

func ResultType

func ResultType[T1 any, T2 any](result types.Result[T1]) ResultTypeConverter[T1, T2]

Jump to

Keyboard shortcuts

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