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:
readandresourcerun loads withspawn_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_signalas its signal.
Structs§
- Async
Boundary - A stable handle. Attach it to exactly one live
Asyncregion. Read status and put selection/retry controls outside that region. - Async
Value - 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. - Cancel
Registration - Unregisters its callback on drop. Keep it alive while the operation is pending.
- Cancellation
Source - 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.
- Cancellation
Token - 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
Clonebound 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§
- Async
Read - A scoped, typed result. Pending is an ordinary value, never control flow via
panic. The HTML compiler evaluates an
Awaitsubtree forReady. - Boundary
Status - Resource
State - 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.