Struct guppy::graph::PackageQuery [−][src]
pub struct PackageQuery<'g> { /* fields omitted */ }
Expand description
A query over a package graph.
This is the entry point for iterators over IDs and dependency links, and dot graph presentation.
A PackageQuery
is constructed through the query_
methods on PackageGraph
.
Implementations
Returns the package graph on which the query is going to be executed.
Returns the direction the query is happening in.
pub fn initials<'a>(
&'a self
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
pub fn initials<'a>(
&'a self
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
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 ID.
Returns an error if this package ID is unknown.
Converts this PackageQuery
into a FeatureQuery
, using the given feature filter.
This will cause the feature graph to be constructed if it hasn’t been done so already.
Resolves this query into a set of known packages, following every link found along the way.
This is the entry point for iterators.
Resolves this query into a set of known packages, using the provided resolver to determine which links are followed.
pub fn resolve_with_fn(
self,
resolver_fn: impl FnMut(&PackageQuery<'g>, PackageLink<'g>) -> bool
) -> PackageSet<'g>
pub fn resolve_with_fn(
self,
resolver_fn: impl FnMut(&PackageQuery<'g>, PackageLink<'g>) -> bool
) -> PackageSet<'g>
Resolves this query into a set of known packages, using the provided resolver function to determine which links are followed.
Trait Implementations
Auto Trait Implementations
impl<'g> RefUnwindSafe for PackageQuery<'g>
impl<'g> Send for PackageQuery<'g>
impl<'g> Sync for PackageQuery<'g>
impl<'g> Unpin for PackageQuery<'g>
impl<'g> UnwindSafe for PackageQuery<'g>
Blanket Implementations
Mutably borrows from an owned value. Read more