Expand description
Async eval bridge for the Console tab.
ConsoleEval is a concrete (no dyn) actor: it owns an mpsc to a
per-console worker that drives rpc::Session::handle_form, plus the
cancel handles (EpochBumper + InterruptHandle). The UI side is
sync — submit is a non-blocking send, drain a try_recv loop —
so the 200 ms run_loop never awaits eval.
Session::handle_form parses an RPC request envelope
((:id N :form <form>)), not a bare form, so submit wraps each
input with a monotonic id before handoff — mirroring nms’s
RpcEval::eval and the sshd eval_channel worker. The worker
receives already-wrapped envelopes and only forwards them.
Two constructors form the test seam: ConsoleEval::spawn builds a
real DB-backed Session actor, while ConsoleEval::echo spawns a
runtime-only worker that echoes frames back (no Session, no DB)
for plumbing tests.
Structs§
- Console
Eval - Async bridge between the sync TUI and an
rpc::Sessioneval worker.