#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.position: usizePosition 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: RoleWhether this compiled something or ran a build script.
crate_name: StringThe --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: boolWhether 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: StringThe 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: UnitKindWhat sort of work this is.
requires_full_closure: boolWhether the unit needs its whole transitive dependency closure to be fully built, which is
Cargo’s requires_upstream_objects.