Skip to main content

BuildMessageKind

Enum BuildMessageKind 

Source
#[non_exhaustive]
pub enum BuildMessageKind { GeneralWarning, StderrForwarding,
#[non_exhaustive]
CommandFailed { is_detection_cmd: bool, exit_status: ExitStatus, }, }
Expand description

What a BuildMessage is about.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

GeneralWarning

Every warning cc prints itself, such as a failed compiler family detection or a setting that doesn’t apply to the compiler. A failed command’s error, which parallel also prints as a warning, arrives as CommandFailed instead.

extra is ().

§

StderrForwarding

Each line of stderr that cc forwards from a command it runs, such as the compiler or the archiver. Stderr that cc hides, such as that of flag support probes, isn’t passed.

A trailing \r is removed, and text that isn’t UTF-8 is converted lossily. extra is the Command.

§

#[non_exhaustive]
CommandFailed

A command cc runs exits unsuccessfully.

The text is the error cc returns, and extra is the Command. Checks whose failure cc expects, such as flag support probes and the ar call with D that cc retries without it, are not reported. Neither are commands that can’t be started, since they have no exit status.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§is_detection_cmd: bool

true for detection commands that don’t break the build: cc recovers when they fail, so the build can still succeed. Examples are the compiler’s --print-search-dirs query, xcrun --show-sdk-version and compiler family detection. cc hides the output of family detection unless cargo_debug is on, so its failures are only reported then, apart from the --version check it runs on clang. A failed family detection still arrives as a GeneralWarning.

false for commands whose failure fails the build, such as the compiler, the archiver or xcrun --show-sdk-path.

§exit_status: ExitStatus

The status the command exited with.

Trait Implementations§

Source§

impl Clone for BuildMessageKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BuildMessageKind

Source§

impl Debug for BuildMessageKind

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for BuildMessageKind

Source§

impl PartialEq for BuildMessageKind

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BuildMessageKind

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.