Skip to main content

Module api_types

Module api_types 

Source
Expand description

Wire shapes shared by the axum server (serializes) and the Dioxus web client (deserializes). #[cfg]-neutral — both features compile this module. The fat /api/day chart payload is deliberately absent from the client side: the web half holds it as an opaque JSON string and hands it straight to the chart shim.

Structs§

Activation
One node’s standing output as of the current tick: fired says whether it was this tick’s work, while out/vals carry the last fired ones forward (None only before the node’s first fire, or once that tick has left the ring). out is the node’s own Glance (card face), vals the flattened elements — a slot is None where the node left it empty. jac is the tick’s own row-major vals.len() × sum(dep lens) local Jacobian — never carried forward — with entries None where the engine saw no signal (NaN doesn’t survive serde_json).
ActivationFrame
Replay position + the last tick’s activations. tick counts consumed events (0 = nothing replayed yet); ts_ns is the last consumed print’s timestamp (0 at start).
DayOut
The /api/day chart payload, opaque to both the server and the wasm client (the chart shim is the only reader). Snapshotted per request — under a live feed it keeps growing.
ExactBlock
A tick’s derivative over every element a body reached back over, not just the newest: per dep in deps order, vals.len() × widths[d] row-major and appended, oldest lag first — so a dep’s last element-group is exactly its Activation::jac column. None entries for the same reason jac’s are: NaN does not survive serde_json.
GuideOut
InkOut
Serde mirror of trading_data_dag::Ink: l/c/a only — hue stays renderer-owned.
PlotOut
Serde mirror of trading_data_dag::Plot. slots indexes the node’s flattened elements (empty = all of them), so a node whose out mixes units draws as several plots, each on its own scale, rather than as several nodes.
PointOut
One bucket’s last fired flat out. What names its slots is the node’s PlotOut::labels crossed out, which is where a field worth reading belongs — the chart’s crosshair line and the DAG panel’s hover both read it from there.
SeekReq
SeekTsReq
SeriesOut
One node’s full-day output sampled once per 1m bucket (last fired value wins). deps lets the chart recompute topo depth without a second fetch; gates routes gate nodes to the chart’s dedicated gates pane.
StepReq
StepUntilChangeReq
StepUntilReq
TopoNode
One node of the static graph, in step (= topo) order. Roots have empty deps. dims is the node’s element shape ([] scalar); the client resolves dep dims by name from topology. gates are the node’s control edges — the client’s gate set is the union over all nodes.

Enums§

FidelityOut
Serde mirror of trading_data_dag::Fidelity: how much of what a node’s body read its Jacobian covers. omits/why carry the kernel’s own string, which is the whole point of the variant.