pub struct ArtifactDependency {
pub workspace_root: Option<PathBuf>,
pub crate_name: Option<String>,
pub artifact_type: CrateType,
pub profile: Profile,
pub build_missing: bool,
pub build_always: bool,
pub features: Vec<String>,
pub target_name: Option<String>,
pub capture_output: bool,
pub env: Option<Vec<(String, String)>>,
}
Expand description
Builder to find and optionally build an artifact dependency from a particular workspace
Fields§
§workspace_root: Option<PathBuf>
Workspace root to search for an artifact dependency in. Defaults to the current workspace if one is not provided.
crate_name: Option<String>
Crate name to search for an artifact dependency for. Defaults to CARGO_PKG_NAME
if it
is set, otherwise the root package name in the workspace. If neither are set, an error
will be returned.
artifact_type: CrateType
Type of artifact to build.
profile: Profile
Profile, defaults to the current profile
build_missing: bool
Build the artifact if it is missing
build_always: bool
(Re-)build the artifact even if it is not missing. This is the default because otherwise it’s very common to have a “what is going on why aren’t my print statements showing up” moment
features: Vec<String>
§target_name: Option<String>
§capture_output: bool
§env: Option<Vec<(String, String)>>
Implementations§
Source§impl ArtifactDependency
impl ArtifactDependency
Sourcepub fn builder() -> ArtifactDependencyBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ArtifactDependencyBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building ArtifactDependency
.
On the builder, call .workspace_root(...)
(optional), .crate_name(...)
(optional), .artifact_type(...)
, .profile(...)
, .build_missing(...)
, .build_always(...)
(optional), .features(...)
(optional), .target_name(...)
(optional), .capture_output(...)
(optional), .env(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ArtifactDependency
.
Trait Implementations§
Source§impl Clone for ArtifactDependency
impl Clone for ArtifactDependency
Source§fn clone(&self) -> ArtifactDependency
fn clone(&self) -> ArtifactDependency
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more