Skip to main content

Module events

Module events 

Source
Expand description

UI-agnostic progress events emitted by the speed-test and diagnostics engines.

The core crate contains no UI code. Instead, long-running operations report their progress by sending TestEvents over a Tokio tokio::sync::mpsc::UnboundedSender. Front-ends (the Ratatui CLI and the GPUI desktop app) subscribe to these events and render them however they like — the CLI reproduces its cyberpunk bandwidth graphs, while the GUI feeds live download/upload charts.

When no sender is supplied the engines run silently, which is exactly what --json output and library consumers want.

Structs§

SelectedServer
A server chosen during selection, with its measured latency and distance.

Enums§

Phase
A single stage of a full speed test.
TestEvent
A progress event emitted while running a test.

Functions§

emit
Send an event on an optional channel, ignoring send errors (a dropped receiver simply means nobody is listening).

Type Aliases§

EventSender
The channel used to stream TestEvents from the engine to a front-end.