Skip to main content

Module config

Module config 

Source

Structs§

TracevaultConfig

Enums§

UserContext
Cross-repo user context source. Cargo-dependency-style shorthand: bool toggles enable at the default path; a string is enable + that path.

Functions§

default_user_context_path
~/.config/tracevault/context.json, alongside credentials.json. Public path accessor (used by tests / lib consumers as the canonical default); production resolves via UserContext::path/path_in, so the bin has no direct caller.
default_user_context_path_in
load_user_config_in
Lenient: missing OR malformed → TracevaultConfig::default() (warn on malformed).
resolve_user_context
resolve_user_context_in rooted at tv_config_root.
resolve_user_context_in
Resolve the effective user-context source. A repo that configured it (Some) wins — including an explicit Some(Toggle(false)) (hard-off, no fallback). Only when the repo did NOT configure it (None) does the user-level config.toml under config_root supply it.
try_load_user_config_in
Load the user-level config.toml, distinguishing a missing file (Ok(None)) from a malformed/unreadable one (Err). Mirrors TracevaultConfig::try_load but for a direct file path (the user-level config is NOT inside a .tracevault/ dir).
tv_config_root
Root of the user-level TraceVault config dir: ~/.config/tracevault/ (beside credentials.json / context.json). Falls back to ./tracevault.
user_config_path
user_config_path_in