Help us shape the future of Go! Take the 2026 Go Developer Survey

erasure

package
v1.1.84 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Erase

func Erase[T any](t T) any

Erase converts a variable of type T to an any by returning a pointer to that variable

func Erase0

func Erase0[T1 any](f func() T1) func() any

Erase0 converts a type safe function into an erased function

func Erase1

func Erase1[T1, T2 any](f func(T1) T2) func(any) any

Erase1 converts a type safe function into an erased function

func Erase2

func Erase2[T1, T2, T3 any](f func(T1, T2) T3) func(any, any) any

Erase2 converts a type safe function into an erased function

func SafeUnerase added in v1.0.58

func SafeUnerase[T any](t any) E.Either[error, T]

SafeUnerase converts an erased variable back to its original value

func Unerase

func Unerase[T any](t any) T

Unerase converts an erased variable back to its original value

Types

This section is empty.

Jump to

Keyboard shortcuts

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