pub enum ToolVersionStatus {
Supported {
version: String,
},
Unsupported {
first_line: Option<String>,
exit_status: Option<i32>,
},
CommandFailed {
first_line: Option<String>,
exit_status: Option<i32>,
},
NotRun {
reason: String,
},
}Expand description
The outcome of asking a resolved tool for its --version (T17.3 — was a bare Option<String> that
silently turned an old fork’s “unknown option” or a non-zero exit into a “version” string). The tool
ran (or didn’t) is now distinguished from the tool has a usable version: a --version that the
tool rejected (old forks like OpenBSD/DragonFly zic) is Unsupported, never a fake version.
Variants§
Supported
--version exited 0 and printed a usable first line.
Unsupported
--version exited non-zero — the tool does not support the flag (typical of old zic forks,
which print usage to stderr and exit 1). The captured first line + exit status are recorded, but
it is not treated as a version.
CommandFailed
--version ran but neither cleanly succeeded with a version nor cleanly rejected the flag (e.g.
exited 0 with no usable output, or was terminated by a signal — exit_status: None).
NotRun
The --version command could not be spawned at all (resolved file not executable, race, …).
Trait Implementations§
Source§impl Clone for ToolVersionStatus
impl Clone for ToolVersionStatus
Source§fn clone(&self) -> ToolVersionStatus
fn clone(&self) -> ToolVersionStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolVersionStatus
impl Debug for ToolVersionStatus
impl Eq for ToolVersionStatus
Source§impl PartialEq for ToolVersionStatus
impl PartialEq for ToolVersionStatus
Source§fn eq(&self, other: &ToolVersionStatus) -> bool
fn eq(&self, other: &ToolVersionStatus) -> bool
self and other values to be equal, and is used by ==.