Expand description
The configuration: the file, overridden by environment variables.
access_id = "…"
base_url = "https://www.rmv.de/hapi/"
timeout_seconds = 20
retries = 2
delay_threshold_minutes = 2The file is config.toml in the directory of dirs::config, or the
one RMV_CONFIG names. RMV_ACCESS_ID and RMV_BASE_URL override the
file.
The access key is a secret: Settings and Config never show it in
their Debug output, and Settings::get returns REDACTED for it.
Structs§
- Config
- The configuration in effect.
- Settings
- The contents of the configuration file. Unset values take their default.
Enums§
- Error
- The configuration file could not be read or written, or a value is invalid.
Constants§
- DEFAULT_
BASE_ URL - The production server of RMV, dialect version 2.39.
- DEFAULT_
DELAY_ THRESHOLD_ MINUTES - From how many minutes late an arrival counts as delayed.
- DEFAULT_
RETRIES - How often a request is repeated after a transient error.
- DEFAULT_
TIMEOUT_ SECONDS - MAX_
RETRIES - The most repetitions the setting allows. Every repetition counts against the quota of the access key.
- REDACTED
- What stands in for the access key in texts of the API that echo it.