Skip to main content

Module view

Module view 

Source
Expand description

The result of a run: a view that follows the content view rules. A table shows as a list tile and a chart as a chart tile, and either can switch to the other (t in the TUI); tiles split right or below like the workspace. The plugin sends it with the result host method (View::to_json in the SDK). ResultView::from_plugin is what a host does with it: parse, check and cut it to the limits below; how it is drawn is the host’s own, with ResultView::as_table, ResultView::as_chart, ResultView::text_lines, and sparkline to start from (drawing images, e.g. with weirdnet-render, is the host’s too).

Structs§

Axis
Line

Enums§

Dir
ResultView

Constants§

MAX_DEPTH
MAX_POINTS
MAX_ROWS
At most this many table rows and chart points are kept (more are cut, with a note).
MAX_TILES
At most this many tiles, nested at most this deep.

Functions§

fmt_ts
Epoch milliseconds as YYYY-MM-DD HH:MM:SS in UTC (the number itself when out of range).
num
A number for people: whole numbers without decimals, two decimals from 1000 up, and up to eight (trailing zeros trimmed) below.
sparkline
▁▂▃▅▇ over at most width buckets (the last value of each).