Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Value ¶ added in v0.18.9
type Value[T any] struct { // contains filtered or unexported fields }
Value is the structure that tracks the value state.
func (*Value[T]) Apply ¶ added in v0.24.0
func (v *Value[T]) Apply(ptr *T)
Apply updates the value of ptr if the value is dirty.
func (*Value[T]) MarshalJSON ¶ added in v0.18.9
MarshalJSON implements the json.Marshaler interface.
func (*Value[T]) OnDirty ¶ added in v0.18.11
func (v *Value[T]) OnDirty(then func(T))
OnDirty runs the then function if the value is dirty.
func (*Value[T]) Set ¶ added in v0.18.9
func (v *Value[T]) Set(value T)
Set updates the value and marks it as dirty.
func (*Value[T]) UnmarshalJSON ¶ added in v0.18.9
UnmarshalJSON implements the json.Unmarshaler interface and marks the value as dirty.
Click to show internal directories.
Click to hide internal directories.