pub(crate) fn read_toml_file<T: DeserializeOwned>(
path: &Path,
label: &str,
) -> Result<Option<T>>Expand description
Shared TOML registry helpers for Tempo local state.
We keep the read/parse and atomic write logic here so keys.toml,
sessions.toml, and any future Tempo registry files all use the same
persistence semantics instead of duplicating the same boilerplate.
Strict readers return Ok(None) only when the file is missing.
Corruption and I/O failures bubble up so mutating paths can fail closed.