Skip to main content

Crate fusor_async

Crate fusor_async 

Source
Expand description

Reactive, latest-key-wins data reads with explicit ownership.

The core accepts a local task spawner. Enable browser for the browser executor and cancellable GET adapter. There is no implicit cache or retry. Only the synchronous key function tracks signals, never the async loader.

Modules§

browser
Browser executor bindings: read and resource run loads with spawn_local.
fetch
An abortable GET adapter for loaders. HTTP caching follows Fetch defaults. For other methods, headers or bodies, build the request yourself and pass CancellationToken::abort_signal as its signal.

Structs§

AsyncBoundary
A stable handle. Attach it to exactly one live Async region. Read status and put selection/retry controls outside that region.
AsyncValue
A declaration of one read. All changing request inputs belong in key. Loader execution is untracked and uses the supplied local executor. Reads participate when reached by a boundary, not merely when declared.
CancelRegistration
Unregisters its callback on drop. Keep it alive while the operation is pending.
CancellationSource
Owner-side cancellation capability, also usable by explicit write adapters. Cancellation stops local work; it cannot establish whether a server committed. Dropping this source cancels its token. Receiving tokens cannot cancel it.
CancellationToken
Cancellation of a single operation. Connect transport cancellation here; stopping polling alone does not stop browser Fetch or undo a server operation.
Data
A successful value and the key that actually produced it.
Resource
A shared handle to one owned read, with no Clone bound on data or errors. Dropping its last handle cancels the read and detaches its key subscription. Cloned handles cannot extend the owner’s lifetime.

Enums§

AsyncRead
A scoped, typed result. Pending is an ordinary value, never control flow via panic. The HTML compiler evaluates an Await subtree for Ready.
BoundaryStatus
ResourceState
Previous data is explicitly labelled; it is never passed off as a new key’s result.

Functions§

boxed_loader
Erase a loader’s future type, so one loader can serve many operations.

Type Aliases§

Loader
A type-erased async operation: an input and its cancellation token in, a local future of O out. Reads use Loader<K, Result<T, E>>.
Spawner
Schedules a local future on the current thread’s executor, without blocking.