pub(crate) struct CargoTargetSpec {
pub(crate) workspace_root: AbsPathBuf,
pub(crate) cargo_toml: ManifestPath,
pub(crate) package: String,
pub(crate) package_id: Arc<PackageId>,
pub(crate) target: String,
pub(crate) target_kind: TargetKind,
pub(crate) crate_id: Crate,
pub(crate) required_features: Vec<String>,
pub(crate) features: FxHashSet<String>,
pub(crate) sysroot_root: Option<AbsPathBuf>,
}Expand description
Abstract representation of Cargo target.
We use it to cook up the set of cli args we need to pass to Cargo to build/test/run the target.
Fields§
§workspace_root: AbsPathBuf§cargo_toml: ManifestPath§package: String§package_id: Arc<PackageId>§target: String§target_kind: TargetKind§crate_id: Crate§required_features: Vec<String>§features: FxHashSet<String>§sysroot_root: Option<AbsPathBuf>Implementations§
Source§impl CargoTargetSpec
impl CargoTargetSpec
pub(crate) fn runnable_args( snap: &GlobalStateSnapshot, spec: Option<CargoTargetSpec>, kind: &RunnableKind, cfg: &Option<CfgExpr>, ) -> (Vec<String>, Vec<String>)
pub(crate) fn override_command( snap: &GlobalStateSnapshot, spec: Option<CargoTargetSpec>, kind: &RunnableKind, ) -> Option<Vec<String>>
fn executable_args_for( kind: &RunnableKind, extra_test_binary_args: impl IntoIterator<Item = String>, ) -> Vec<String>
pub(crate) fn push_to(self, buf: &mut Vec<String>, kind: &RunnableKind)
Trait Implementations§
Source§impl Clone for CargoTargetSpec
impl Clone for CargoTargetSpec
Source§fn clone(&self) -> CargoTargetSpec
fn clone(&self) -> CargoTargetSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CargoTargetSpec
impl RefUnwindSafe for CargoTargetSpec
impl Send for CargoTargetSpec
impl Sync for CargoTargetSpec
impl Unpin for CargoTargetSpec
impl UnsafeUnpin for CargoTargetSpec
impl UnwindSafe for CargoTargetSpec
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more