pub enum ToolProbe {
Available,
Unavailable,
ProbeFailed(Error),
}Expand description
Outcome of a spawn-probe availability check (runs).
The NotFound-folds-into-Unavailable decision is made exactly once,
here — and a genuine probe failure is a distinct variant so no call site
can silently masquerade a broken probe as clean tool absence.
Variants§
Available
The probe ran and exited zero — the tool is available.
The tool is cleanly absent: not on PATH (spawn failed with
NotFound), or it ran but exited non-zero on its version flag
(stub binary / version-flag mismatch).
ProbeFailed(Error)
The probe itself failed for a non-NotFound reason (permission
denied, exec-format error, …): presence is UNKNOWN, not “absent”.
Callers must surface the error rather than collapse it to
ToolProbe::Unavailable.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ToolProbe
impl !UnwindSafe for ToolProbe
impl Freeze for ToolProbe
impl Send for ToolProbe
impl Sync for ToolProbe
impl Unpin for ToolProbe
impl UnsafeUnpin for ToolProbe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more