Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultValue ¶
func DefaultValue[T any]() T
Types ¶
type Pointer ¶
func NewPointer ¶
func (*Pointer[T]) MarshalJSON ¶
func (*Pointer[T]) UnmarshalJSON ¶
type TypedValue ¶
type TypedValue[T any] struct { // contains filtered or unexported fields }
func NewTypedValue ¶
func NewTypedValue[T any](t T) (v TypedValue[T])
func (*TypedValue[T]) CompareAndSwap ¶
func (t *TypedValue[T]) CompareAndSwap(old, new T) bool
func (*TypedValue[T]) Load ¶
func (t *TypedValue[T]) Load() T
func (*TypedValue[T]) MarshalJSON ¶
func (t *TypedValue[T]) MarshalJSON() ([]byte, error)
func (*TypedValue[T]) Store ¶
func (t *TypedValue[T]) Store(value T)
func (*TypedValue[T]) Swap ¶
func (t *TypedValue[T]) Swap(new T) T
func (*TypedValue[T]) UnmarshalJSON ¶
func (t *TypedValue[T]) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.