Skip to main content

Module render

Module render 

Source

Structs§

Ink
ANSI styles — cmduse’s palette, or empty strings when colour is off, so a piped run never leaks SGR escapes.

Constants§

DEFAULT_BAR_WIDTH
Gauge width for the window bars when neither config nor --bar-width says otherwise — cmduse’s own default.

Functions§

afp
AFP with thousands separators and no decimals. AFP is a countable quota, not a currency: a tenth of a point is below the control plane’s own noise (it reports fractions, the console floors them).
bucket_text
AFP per bucket (day or hour), oldest first — arkuse daily / arkuse hourly.
compact_line
Minimal one-line dashboard for terminals too small for the full frame.
date_of
YYYY-MM-DD for a Unix day number.
model_report
Per-model report: Json mirrors cmduse’s model --json envelope with AFP in place of dollars; Csv is one row per model. Table is the caller’s.
model_text
One model’s period record: what it cost in AFP, where that AFP sits in each window, and how much of the period it accounts for.
models_json
One JSON object per line, mirroring models_text — the shape cmduse’s own models --json uses, so a consumer pipes either binary the same way.
models_period_text
The period’s per-model breakdown as a table — what arkuse model with no id prints. Columns mirror the dashboard’s model block so a reader can put the two side by side.
models_text
The model catalogue with its coefficient in force today. gated keeps only what plan_id grants; the table always says which tier a model needs, because the plan you hold changes what you can call.
plans_json
plans_text
The tier catalogue: what each plan costs, what quota it grants, and how that quota is split across the windows. The window figures are the plan’s own fractions of its monthly AFP — the same table the console shows per tier.
render_json
render_text
limit rows to show; usize::MAX for all.
session_text
AFP per session, newest first — the same columns as ocuse session, with AFP in place of USD.
statusline_json
statusline_template
arkuse’s statusline: cmduse’s {key} template engine (report_render::render_template) resolved against this report’s own placeholders.
watch_frame
One watch frame: the dashboard, then an AFP-burst sparkline when the 5-hour figure has moved since the previous refresh. No trailing newline — the caller appends its own status line and redraw_frame (cmduse’s) parks the cursor there, which is what lets the countdown rewrite a single line per second.
yuan
Yuan, for prices only — never for metered usage, which is AFP.