Skip to main content

Module params

Module params 

Source
Expand description

Query-string handling: ?tool=pi&bucket=daily&window=month.

Structs§

UsageParams
Raw, optional query-string values. Unknown values fall back to defaults instead of failing the request, so a stale bookmark never 400s.

Constants§

WINDOW_CHOICES
Window choices offered by the interactive UI. auto means “the chosen bucket’s natural window” (see Bucket::default_window).

Functions§

parse
Parse optional string parameters into a Query, ignoring invalid values.
parse_metric
The chart metric from an optional string (unknown values fall back to tokens).
parse_selection
A selection from optional strings; empty strings mean “nothing selected”.
pick_currency
The currency to show: an explicit, valid requested code wins (with the user’s own rate from rates if they set one), otherwise saved.