pub struct CargoInvocation {
pub cargo_program: OsString,
pub working_directory: PathBuf,
pub environment: BTreeMap<OsString, OsString>,
pub target: String,
pub selection: CargoSelection,
pub packages: Vec<String>,
pub manifest_path: Option<PathBuf>,
pub recipe: CargoRecipe,
pub configurations: Vec<OsString>,
pub render_diagnostics: bool,
pub keep_going: bool,
}Expand description
One concrete Cargo invocation with an explicit, complete child environment.
Graph arguments are rendered from selection, never reconstructed from argv.
Configurations and compiler arguments are caller-owned recipe policy. These
observations do not validate source custody or admit a release. Debug is not
implemented because environment/configuration values may contain secrets.
Fields§
§cargo_program: OsStringSelected Cargo executable.
working_directory: PathBufAbsolute Cargo working directory, also used by identity probes.
environment: BTreeMap<OsString, OsString>Complete child environment. No parent variables are inherited.
Observed execution requires an explicit nonempty RUSTC entry, so Cargo
cannot select a different compiler through unobserved configuration.
target: StringCompilation target, rendered into the command and retained in facts.
selection: CargoSelectionProfile, features and network/lock policy, rendered exactly once.
packages: Vec<String>Package selectors; an empty list leaves Cargo’s workspace selection intact.
manifest_path: Option<PathBuf>Optional explicit manifest.
recipe: CargoRecipeSelected library/example/compiler recipe.
configurations: Vec<OsString>Explicit Cargo --config values, retaining their order.
render_diagnostics: boolRequest Cargo’s json-render-diagnostics instead of json messages.
keep_going: boolContinue independent compilation jobs after a build error.
Implementations§
Source§impl CargoInvocation
impl CargoInvocation
Sourcepub fn command(&self) -> Result<Command>
pub fn command(&self) -> Result<Command>
Render the selected invocation without spawning a process.
This leaves stdio and process custody unconfigured. execute_cargo sets
null stdin and piped output before invoking the caller’s spawner, which
may override stdio and custody. Changing executable, cwd, arguments or
environment invalidates execution facts. Separate execution earns no receipt.
§Errors
Refuses relative working directories and invalid profile components.
Trait Implementations§
Source§impl Clone for CargoInvocation
impl Clone for CargoInvocation
impl Eq for CargoInvocation
Source§impl PartialEq for CargoInvocation
impl PartialEq for CargoInvocation
impl StructuralPartialEq for CargoInvocation
Auto Trait Implementations§
impl Freeze for CargoInvocation
impl RefUnwindSafe for CargoInvocation
impl Send for CargoInvocation
impl Sync for CargoInvocation
impl Unpin for CargoInvocation
impl UnsafeUnpin for CargoInvocation
impl UnwindSafe for CargoInvocation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.