AsyncMutable<'a>
Namespace: Gjallarhorn
Type which manages state internally using a mailbox
Constructors
Constructor | Description |
new(initialState)
Signature: initialState:'a -> AsyncMutable<'a>
|
CompiledName: .ctor
|
Instance members
Instance member | Description |
Get()
Signature: unit -> 'a
|
Get the current state synchronously
|
GetAsync()
Signature: unit -> Async<'a>
|
Get the current state asynchronously
|
Set(model)
Signature: model:'a -> 'a
|
Set the state to a new value synchronously
|
SetAsync(model)
Signature: model:'a -> Async<'a>
|
Set the state to a new value asynchronously
|
Update(fn)
Signature: (fn:('a -> 'a)) -> 'a
|
Perform an update on the current state
|
UpdateAsync(fn)
Signature: (fn:('a -> 'a)) -> Async<'a>
|
Perform an update on the current state asynchronously
|