pub fn diagnose_platform_support() -> Vec<DiagnosticEntry>Expand description
Check whether OS theme detection is available on this platform.
Returns a list of DiagnosticEntry values describing what detection
capabilities are available and what might be missing. Useful for
debugging theme detection failures in end-user applications.
Each entry can be printed directly via its Display impl, or
inspected programmatically via DiagnosticEntry::name(),
DiagnosticEntry::status(), and DiagnosticEntry::detail().
§Platform Behavior
- Linux: Reports detected desktop environment,
gsettingsavailability,XDG_CURRENT_DESKTOPvalue, and KDE config file presence (when thekdefeature is enabled). - macOS: Reports whether the
macosfeature is enabled. - Windows: Reports whether the
windowsfeature is enabled. - Other: Reports that no platform detection is available.
§Examples
let diagnostics = native_theme::pipeline::diagnose_platform_support();
for entry in &diagnostics {
println!("{entry}");
}