Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBindingValue ¶
func NewBindingValue[T any](b Binding[T]) (Value[T], CancelFunc)
NewBindingValue ...
Types ¶
type Binding ¶
type Binding[T any] interface { // OnChange registers a handler f that handles value changes. // Note that f should not perform time-consuming operations. OnChange(f func(T)) CancelFunc // Binding is a helper function to return this Binding() Binding[T] }
Binding ...
func NewAsyncBinding ¶
NewAsyncBinding creates a binding that runs in a separate goroutine
type CancelFunc ¶
type CancelFunc func()
A CancelFunc tells an operation to abandon its work. A CancelFunc may be called by multiple goroutines simultaneously. After the first call, subsequent calls to a CancelFunc do nothing.
Click to show internal directories.
Click to hide internal directories.