Skip to main content

diagnose_platform_support

Function diagnose_platform_support 

Source
pub fn diagnose_platform_support() -> Vec<String>
Expand description

Check whether OS theme detection is available on this platform.

Returns a list of human-readable diagnostic messages describing what detection capabilities are available and what might be missing. Useful for debugging theme detection failures in end-user applications.

§Platform Behavior

  • Linux: Reports detected desktop environment, gsettings availability, XDG_CURRENT_DESKTOP value, and KDE config file presence (when the kde feature is enabled).
  • macOS: Reports whether the macos feature is enabled.
  • Windows: Reports whether the windows feature is enabled.
  • Other: Reports that no platform detection is available.

§Examples

let diagnostics = native_theme::diagnose_platform_support();
for line in &diagnostics {
    println!("{}", line);
}