Skip to main content

Detected

Struct Detected 

Source
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

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for Detected

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.