#[non_exhaustive]pub enum DiagnosticEntry {
Platform(&'static str),
DesktopEnv(LinuxDesktop),
EnvVar {
name: &'static str,
value: String,
},
EnvVarMissing(&'static str),
ToolAvailable {
name: &'static str,
version: String,
},
ToolError(&'static str),
ToolMissing {
name: &'static str,
impact: &'static str,
},
ConfigFound {
name: &'static str,
path: PathBuf,
},
ConfigMissing {
name: &'static str,
path: PathBuf,
},
FeatureEnabled(&'static str),
FeatureDisabled {
feature: &'static str,
impact: &'static str,
},
OsGeneration {
version: String,
preset: &'static str,
version_match: VersionMatch,
},
}Expand description
A single diagnostic observation about platform theme support.
Returned by diagnose_platform_support(). Each variant represents
a specific category of diagnostic information. Use Display to get
a human-readable string, or pattern-match for programmatic inspection.
For simple tabular output, use the name(),
status(), and detail() accessors:
let diagnostics = native_theme::pipeline::diagnose_platform_support();
for entry in &diagnostics {
print!("{}: {}", entry.name(), entry.status());
if let Some(detail) = entry.detail() {
print!(" ({})", detail);
}
println!();
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Platform(&'static str)
Platform identification (e.g. “Linux”, “macOS”, “Windows”).
DesktopEnv(LinuxDesktop)
Detected desktop environment (Linux only).
EnvVar
An environment variable was read successfully.
Fields
EnvVarMissing(&'static str)
An environment variable was missing or empty.
ToolAvailable
An external tool was found and operational.
Fields
ToolError(&'static str)
An external tool was found but returned an error.
ToolMissing
An external tool was not found on PATH.
Fields
ConfigFound
A config file was found at the given path.
Fields
ConfigMissing
A config file was not found at the expected path.
FeatureEnabled(&'static str)
A cargo feature is enabled.
FeatureDisabled
A cargo feature is disabled.
Fields
OsGeneration
The running OS version and the preset of its generation (macOS and Windows, with their reader feature).
Implementations§
Source§impl DiagnosticEntry
impl DiagnosticEntry
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
A short label identifying what is being diagnosed.
Examples: "Platform", "XDG_CURRENT_DESKTOP", "gsettings",
"KDE kdeglobals", "Portal support".