Skip to main content

load_or_default

Function load_or_default 

Source
pub fn load_or_default() -> UserExtensionConfig
Expand description

The config.toml settings, or defaults when it is missing or unreadable.

Never fails: a caller on the fetch path wants the setting or the default, and one bad line in a config file must not take a fetch down. A read or parse failure is logged at warn — not swallowed — for the reason store_root_from_config records: TOML fails the whole document, so a typo anywhere makes every file rung disappear at once, and the resulting behaviour is indistinguishable from “nothing was configured”.