Struct guppy::graph::feature::FeatureQuery [−][src]
pub struct FeatureQuery<'g> { /* fields omitted */ }
Expand description
A query over a feature graph.
A FeatureQuery
is the entry point for Cargo resolution, and also provides iterators over
feature IDs and links. This struct is constructed through the query_
methods on
FeatureGraph
, or through PackageQuery::to_feature_query
.
Implementations
Returns the feature graph the query is going to be executed on.
Returns the direction the query is happening in.
pub fn initials<'a>(
&'a self
) -> impl Iterator<Item = FeatureMetadata<'g>> + ExactSizeIterator + 'a
pub fn initials<'a>(
&'a self
) -> impl Iterator<Item = FeatureMetadata<'g>> + ExactSizeIterator + 'a
Returns the list of initial features specified in the query.
The order of features is unspecified.
Returns the list of initial packages specified in the query.
The order of packages is unspecified.
Returns true if the query starts from the given package.
Returns an error if the package ID is unknown.
Returns true if the query starts from the given feature ID.
Returns an error if this feature ID is unknown.
Resolves this query into a set of known feature IDs.
This is the entry point for iterators.
Resolves this query into a set of known feature IDs, using the provided resolver to determine which links are followed.
pub fn resolve_with_fn(
self,
resolver_fn: impl FnMut(&FeatureQuery<'g>, CrossLink<'g>) -> bool
) -> FeatureSet<'g>
pub fn resolve_with_fn(
self,
resolver_fn: impl FnMut(&FeatureQuery<'g>, CrossLink<'g>) -> bool
) -> FeatureSet<'g>
Resolves this query into a set of known feature IDs, using the provided resolver function to determine which links are followed.
Trait Implementations
Auto Trait Implementations
impl<'g> RefUnwindSafe for FeatureQuery<'g>
impl<'g> Send for FeatureQuery<'g>
impl<'g> Sync for FeatureQuery<'g>
impl<'g> Unpin for FeatureQuery<'g>
impl<'g> UnwindSafe for FeatureQuery<'g>
Blanket Implementations
Mutably borrows from an owned value. Read more