Skip to main content

Invocation

Struct Invocation 

Source
#[non_exhaustive]
pub struct Invocation {
Show 17 fields pub position: usize, pub role: Role, pub crate_name: String, pub crate_types: Vec<String>, pub emits: Vec<String>, pub pipelined: bool, pub extra_filename: Option<String>, pub metadata_hash: Option<String>, pub externs: Vec<ExternRef>, pub source_path: String, pub features: Vec<String>, pub registry_package: Option<PackageRef>, pub directory_package: Option<String>, pub run_package: Option<String>, pub run_artifact: Option<String>, pub kind: UnitKind, pub requires_full_closure: bool,
}
Expand description

One piece of work Cargo performed, as the verbose log recorded it.

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.
§position: usize

Position among the Running lines, counted from zero. Cargo prints these as it starts each job, so the order approximates the order the timing report lists units in.

§role: Role

Whether this compiled something or ran a build script.

§crate_name: String

The --crate-name, or empty for a build-script execution.

§crate_types: Vec<String>

Every --crate-type. Cargo writes one for a binary too; empty is the fallback, and is read as something that links, since assuming a library would drop a closure requirement.

§emits: Vec<String>

The --emit list.

§pipelined: bool

Whether the unit emits metadata, which is exactly when a dependent may start against it before it has finished.

§extra_filename: Option<String>

The -C extra-filename, including its leading dash. This is the unit’s identity: every --extern path that names this unit’s artifact embeds it.

§metadata_hash: Option<String>

The -C metadata hash, which distinguishes two instances of one package that differ only in features or in being built for the host rather than the target.

§externs: Vec<ExternRef>

Every --extern that named an artifact. --extern proc_macro, which names the compiler’s own crate and has no path, is not one of these.

§source_path: String

The source file the invocation compiled, exactly as it appeared. Cargo writes this relative to the workspace root for a workspace-local target and absolute for a registry one.

§features: Vec<String>

The features the unit was compiled with, sorted, recovered from --cfg feature="…".

§registry_package: Option<PackageRef>

The package, where the source path stated it exactly.

§directory_package: Option<String>

The package’s own directory name, for a workspace-local target whose source path did not. A heuristic: a package need not be named after its directory.

§run_package: Option<String>

The package name, for a build-script compilation or execution, taken from the target/<profile>/build/<package>-<hash> directory Cargo gives it. Exact.

§run_artifact: Option<String>

The compiled build script’s -C extra-filename, including its leading dash, for a build-script execution. This ties the run to the compilation exactly.

§kind: UnitKind

What sort of work this is.

§requires_full_closure: bool

Whether the unit needs its whole transitive dependency closure to be fully built, which is Cargo’s requires_upstream_objects.

Trait Implementations§

Source§

impl Clone for Invocation

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 Invocation

Source§

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

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

impl Eq for Invocation

Source§

impl PartialEq for Invocation

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 Invocation

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.