pub struct Detected {
pub installs: Result<Vec<VsInstallation>, ToolchainError>,
pub llvm: Result<Vec<LlvmTool>, ToolchainError>,
pub gcc: Option<Result<Vec<Gcc>, ToolchainError>>,
}Expand description
What detection found. Each part is a result of its own, so a caller that
reports problems (cuno doctor) keeps going after one fails.
Fields§
§installs: Result<Vec<VsInstallation>, ToolchainError>Every Visual Studio installation; empty on a host that has none.
llvm: Result<Vec<LlvmTool>, ToolchainError>Every LLVM tool found, in search order.
gcc: Option<Result<Vec<Gcc>, ToolchainError>>Every GCC, or None when it was not looked for: GCC is searched
only when it is wanted, or by cuno doctor (toolchain.md, “MinGW
(GCC)”). detect leaves it None.
Implementations§
Source§impl Detected
impl Detected
Sourcepub fn search_error(&self, kind: CompilerKind) -> Option<&ToolchainError>
pub fn search_error(&self, kind: CompilerKind) -> Option<&ToolchainError>
Why kind was not searched for, when its search failed (a
configured path with no file there). A new compiler does not compile
until it says where its search’s error is kept.
Sourcepub fn found<'a>(&'a self, explicit_msvc: Option<&'a Path>) -> Found<'a>
pub fn found<'a>(&'a self, explicit_msvc: Option<&'a Path>) -> Found<'a>
What selection chooses from: each part found, empty where its search failed or did not run.
Sourcepub fn looked_for(&self, kind: CompilerKind) -> bool
pub fn looked_for(&self, kind: CompilerKind) -> bool
Whether kind was searched for, so an empty result means it was
not found. A search that failed (a configured path with no file,
already reported) looked for nothing. Visual Studio is always
searched; whether it was found is selection’s answer.