convert

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromParentClosePolicy added in v1.17.0

func FromParentClosePolicy(p temporalv1.ParentClosePolicy) enums.ParentClosePolicy

func IterMapDeterministic

func IterMapDeterministic[K cmp.Ordered, V any](m map[K]V) iter.Seq2[K, V]

func MapSliceFunc

func MapSliceFunc[T, U any](s []T, f func(T) (U, error)) ([]U, error)

func MarshalTypedSearchAttributes added in v1.19.0

func MarshalTypedSearchAttributes(sa map[string]any) (tsa temporal.SearchAttributes, err error)

func Must

func Must[T any](v T, err error) T

func SafeCast

func SafeCast[T Number, U Number](val T) (U, error)

SafeCast attempts to convert a value of type T to type U. If the value cannot be represented by U without overflow or underflow, it returns an error.

func ToParentClosePolicy added in v1.17.0

func ToParentClosePolicy(p enums.ParentClosePolicy) temporalv1.ParentClosePolicy

Types

type Float

type Float interface {
	~float32 | ~float64
}

Float is a constraint that permits float32 or float64.

type Number

type Number interface {
	Signed | Unsigned | Float
}

Number is a union of the Signed, Unsigned, and Float constraints.

type Signed

type Signed interface {
	constraints.Signed
}

Signed is a constraint that permits any signed integer type.

type Unsigned

type Unsigned interface {
	constraints.Unsigned
}

Unsigned is a constraint that permits any unsigned integer type.

Jump to

Keyboard shortcuts

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