[−][src]Struct guppy::graph::cargo::CargoSet
A set of packages and features, as would be built by Cargo.
Cargo implements a set of algorithms to figure out which packages or features are built in
a given situation. guppy
implements those algorithms.
Implementations
impl<'g> CargoSet<'g>
[src]
pub fn new(query: FeatureQuery<'g>, opts: &CargoOptions) -> Result<Self, Error>
[src]
Creates a new CargoSet
based on the given query and options.
This is also accessible through FeatureQuery::resolve_cargo()
, and it may be more
convenient to use that if the code is written in a "fluent" style.
pub fn feature_graph(&self) -> &FeatureGraph<'g>
[src]
Returns the feature graph for this CargoSet
instance.
pub fn package_graph(&self) -> &'g PackageGraph
[src]
Returns the package graph for this CargoSet
instance.
pub fn original_query(&self) -> &FeatureQuery<'g>
[src]
Returns the original query from which the CargoSet
instance was constructed.
pub fn target_features(&self) -> &FeatureSet<'g>
[src]
Returns the feature set enabled on the target platform.
This represents the packages and features that are included as code in the final build artifacts. This is relevant for both cross-compilation and auditing.
pub fn host_features(&self) -> &FeatureSet<'g>
[src]
Returns the feature set enabled on the host platform.
This represents the packages and features that influence the final build artifacts, but whose code is generally not directly included.
This includes all procedural macros, including those specified in the initial query.
pub fn target_direct_deps(&self) -> &PackageSet<'g>
[src]
Returns the set of workspace and direct dependency packages on the target platform.
The packages in this set are a subset of the packages in target_features
.
pub fn host_direct_deps(&self) -> &PackageSet<'g>
[src]
Returns the set of workspace and direct dependency packages on the host platform.
The packages in this set are a subset of the packages in host_features
.
pub fn proc_macro_links<'a>(
&'a self
) -> impl Iterator<Item = PackageLink<'g>> + ExactSizeIterator + 'a
[src]
&'a self
) -> impl Iterator<Item = PackageLink<'g>> + ExactSizeIterator + 'a
Returns PackageLink
instances for procedural macro dependencies from target packages.
Procedural macros straddle the line between target and host: they're built for the host but generate code that is compiled for the target platform.
Notes
Procedural macro packages will be included in the host feature set.
The returned iterator will include proc macros that are depended on normally or in dev
builds from initials (if include_dev
is set), but not the ones in the
[build-dependencies]
section.
pub fn build_dep_links<'a>(
&'a self
) -> impl Iterator<Item = PackageLink<'g>> + ExactSizeIterator + 'a
[src]
&'a self
) -> impl Iterator<Item = PackageLink<'g>> + ExactSizeIterator + 'a
Returns PackageLink
instances for build dependencies from target packages.
Notes
For each link, the from
is built on the target while the to
is built on the host.
It is possible (though rare) that a build dependency is also included as a normal
dependency, or as a dev dependency in which case it will also be built on the target.
The returned iterators will not include build dependencies of host packages -- those are also built on the host.
Auto Trait Implementations
impl<'g> RefUnwindSafe for CargoSet<'g>
impl<'g> Send for CargoSet<'g>
impl<'g> Sync for CargoSet<'g>
impl<'g> Unpin for CargoSet<'g>
impl<'g> UnwindSafe for CargoSet<'g>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,