SafeAsyncNodeX<T> extension

Adds mounted-safe async execution helpers directly on async state nodes.

on

Methods

guard(ZenithRef ref, Future<T> future()) → Future<void>

Available on ZenithNode<AsyncValue<T>>, provided by the SafeAsyncNodeX extension

Executes future and writes its result to this node, guarding every mutation with ref's lifecycle. Equivalent to ref.runAsync(this, future).