Documentation
¶
Index ¶
- func OnceFunc(f func()) func()
- func OnceResult[T any](f func() (T, error)) func() (T, error)
- func OnceValue[T any](f func() T) func() T
- func Ternary[T any](ok bool, lhs Value[T], rhs Value[T]) T
- func TernaryValue[T any](ok Value[bool], lhs Value[T], rhs Value[T]) T
- type LazyCell
- type OnceCell
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnceFunc ¶ added in v0.4.0
func OnceFunc(f func()) func()
OnceFunc port from unreleased std module, sync.OnceFunc
func OnceResult ¶ added in v0.4.0
OnceResult port from unreleased std module, sync.OnceValues
func OnceValue ¶ added in v0.4.0
func OnceValue[T any](f func() T) func() T
OnceValue port from unreleased std module, sync.OnceValue
Types ¶
type LazyCell ¶ added in v0.4.0
type LazyCell[T any] struct { // contains filtered or unexported fields }
LazyCell is a lazy value.
Which is initialized on the first access.
func NewLazyCell ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.