Enum BuildMessageKind

#[non_exhaustive]
pub enum BuildMessageKind

What a BuildMessage is about.

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.

CommandFailed { is_detection_cmd: bool, exit_status: ExitStatus }

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.

CompileCommand

cc is about to run the command that compiles one source file into an object file, during Build::compile or Build::compile_intermediates. Each object file gets one message, also with the parallel feature.

The text is the command line, and extra is the CompileCommand, which a CompileCommandCollector collects to write a compile_commands.json.

Trait Implementations

impl Clone for BuildMessageKind

fn clone(&self) -> Self

impl Copy for BuildMessageKind

impl Debug for BuildMessageKind

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

impl Eq for BuildMessageKind

impl PartialEq for BuildMessageKind

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

impl StructuralPartialEq for BuildMessageKind

Auto Trait Implementations

impl Freeze for BuildMessageKind

impl RefUnwindSafe for BuildMessageKind

impl Send for BuildMessageKind

impl Sync for BuildMessageKind

impl Unpin for BuildMessageKind

impl UnsafeUnpin for BuildMessageKind

impl UnwindSafe for BuildMessageKind

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> CloneToUninit for BuildMessageKind where T: Clone,

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

impl<T> From<T> for BuildMessageKind

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for BuildMessageKind where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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