pub fn try_load_theme_from_content(content: &str) -> Result<Theme, String>Expand description
What: Parse theme configuration text into a Theme without touching disk.
Inputs:
content: Full theme configuration text (key = valuecolor pairs).
Output:
Ok(Theme)when all required colors are present and valid.Err(String)containing newline-separated diagnostics when parsing fails.
Details:
- In-memory twin of [
try_load_theme_with_diagnostics]; used by the integrated config editor to validate proposed content before committing a theme write, so an invalid edit never reachestheme.conf.
§Errors
- Returns newline-separated diagnostics when required keys are missing, duplicated, or colors fail to parse.
§Panics
- Never in practice: the internal
expectruns only after the missing-required-keys check guarantees every canonical key is present.