Skip to main content

BuildMeta

Struct BuildMeta 

Source
#[non_exhaustive]
pub struct BuildMeta {
Show 15 fields pub cargo_version: Option<String>, pub rustc_version: Option<String>, pub host: Option<String>, pub target: Option<String>, pub profile: Option<String>, pub jobs: Option<u32>, pub cpus: Option<u32>, pub observed_max_concurrency: Option<u32>, pub units_total: usize, pub units_fresh: usize, pub compilation_span: Millis, pub reported_total: Option<Millis>, pub excluded_prefix: Millis, pub targets: Option<String>, pub build_start: Option<String>,
}
Expand description

Where a build’s numbers came from.

Every field the timing report does not state is None rather than guessed. cargo_version is one of those: the report’s header names the rustc version and not Cargo’s, so a caller that knows it should fill this in.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§cargo_version: Option<String>

The Cargo version, which the timing report does not state.

§rustc_version: Option<String>

The rustc version, from the timing report’s header.

§host: Option<String>

The host triple.

§target: Option<String>

The target triple.

§profile: Option<String>

The profile the build used.

§jobs: Option<u32>

The -j the build ran with.

§cpus: Option<u32>

The machine’s processor count.

§observed_max_concurrency: Option<u32>

The peak number of units Cargo actually had in flight, which can exceed jobs because a build-script execution takes no compile token.

§units_total: usize

Units in the build.

§units_fresh: usize

Of those, units that were reused from the cache. Always zero, since a build with any is refused.

§compilation_span: Millis

The last unit’s end minus the first unit’s start.

§reported_total: Option<Millis>

Cargo’s own total for the build.

§excluded_prefix: Millis

The reported total minus the compilation span: fetching, resolution, and anything else outside the unit model. Reported rather than folded in.

§targets: Option<String>

The targets the build was asked for, as the report’s header displays them.

§build_start: Option<String>

When the build started, exactly as the report wrote it.

Trait Implementations§

Source§

impl Clone for BuildMeta

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 Debug for BuildMeta

Source§

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

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

impl Default for BuildMeta

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for BuildMeta

Source§

impl PartialEq for BuildMeta

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 BuildMeta

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.