Trait PackageExt

Source
pub trait PackageExt {
    // Required method
    fn cargo(&self, builder: impl FnOnce(&mut Command)) -> Result<CargoChild>;
}
Expand description

An extension for Package and for Metadata to run a cargo command a bit more easily. Ideal for scripting.

Required Methods§

Source

fn cargo(&self, builder: impl FnOnce(&mut Command)) -> Result<CargoChild>

Run the cargo command in the package’s directory if ran on a Package or in the workspace root if ran on a Metadata.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§