Struct guppy::graph::PackageSet [−][src]
A set of resolved packages in a package graph.
Created by PackageQuery::resolve
.
Implementations
impl<'g> PackageSet<'g>
[src]
pub fn len(&self) -> usize
[src]
Returns the number of packages in this set.
pub fn is_empty(&self) -> bool
[src]
Returns true if no packages were resolved in this set.
pub fn contains(&self, package_id: &PackageId) -> Result<bool, Error>
[src]
Returns true if this package ID is contained in this resolve set.
Returns an error if the package ID is unknown.
pub fn to_package_query(
&self,
direction: DependencyDirection
) -> PackageQuery<'g>
[src]
&self,
direction: DependencyDirection
) -> PackageQuery<'g>
Creates a new PackageQuery
from this set in the specified direction.
This is equivalent to constructing a query from all the package_ids
.
pub fn union(&self, other: &Self) -> Self
[src]
Returns a PackageSet
that contains all packages present in at least one of self
and other
.
Panics
Panics if the package graphs associated with self
and other
don’t match.
pub fn intersection(&self, other: &Self) -> Self
[src]
Returns a PackageSet
that contains all packages present in both self
and other
.
Panics
Panics if the package graphs associated with self
and other
don’t match.
pub fn difference(&self, other: &Self) -> Self
[src]
Returns a PackageSet
that contains all packages present in self
but not other
.
Panics
Panics if the package graphs associated with self
and other
don’t match.
pub fn symmetric_difference(&self, other: &Self) -> Self
[src]
Returns a PackageSet
that contains all packages present in exactly one of self
and
other
.
Panics
Panics if the package graphs associated with self
and other
don’t match.
pub fn to_feature_set(&self, filter: impl FeatureFilter<'g>) -> FeatureSet<'g>
[src]
Creates a new FeatureSet
consisting of all packages in this PackageSet
, using the given
feature filter.
This will cause the feature graph to be constructed if it hasn’t been done so already.
pub fn package_ids<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
Iterates over package IDs, in topological order in the direction specified.
Cycles
The packages within a dependency cycle will be returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then Foo is returned before Bar.
pub fn packages<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
Iterates over package metadatas, in topological order in the direction specified.
Cycles
The packages within a dependency cycle will be returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then Foo is returned before Bar.
pub fn root_ids<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
Returns the set of “root package” IDs in the specified direction.
- If direction is Forward, return the set of packages that do not have any dependencies within the selected graph.
- If direction is Reverse, return the set of packages that do not have any dependents within the selected graph.
Cycles
If a root consists of a dependency cycle, all the packages in it will be returned in non-dev order (when the direction is forward).
pub fn root_packages<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
Returns the set of “root package” metadatas in the specified direction.
- If direction is Forward, return the set of packages that do not have any dependencies within the selected graph.
- If direction is Reverse, return the set of packages that do not have any dependents within the selected graph.
Cycles
If a root consists of a dependency cycle, all the packages in it will be returned in non-dev order (when the direction is forward).
pub fn links<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageLink<'g>> + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageLink<'g>> + 'a
Creates an iterator over PackageLink
instances.
If the iteration is in forward order, for any given package, at least one link where the
package is on the to
end is returned before any links where the package is on the
from
end.
If the iteration is in reverse order, for any given package, at least one link where the
package is on the from
end is returned before any links where the package is on the to
end.
Cycles
The links in a dependency cycle will be returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then the link Foo -> Bar is returned before the link Bar -> Foo.
pub fn display_dot<'a, V: PackageDotVisitor + 'g>(
&'a self,
visitor: V
) -> impl Display + 'a
[src]
&'a self,
visitor: V
) -> impl Display + 'a
Constructs a representation of the selected packages in dot
format.
Trait Implementations
impl<'g> Clone for PackageSet<'g>
[src]
fn clone(&self) -> PackageSet<'g>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'g> Debug for PackageSet<'g>
[src]
impl<'g> Eq for PackageSet<'g>
[src]
impl<'g> PartialEq<PackageSet<'g>> for PackageSet<'g>
[src]
Auto Trait Implementations
impl<'g> RefUnwindSafe for PackageSet<'g>
impl<'g> Send for PackageSet<'g>
impl<'g> Sync for PackageSet<'g>
impl<'g> Unpin for PackageSet<'g>
impl<'g> UnwindSafe for PackageSet<'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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
[src]
T: 'a + Clone + Send + Sync,
pub fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
[src]
pub fn self_address_mut(&mut self) -> *mut ()
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
[src]
T: 'a + Clone,
pub fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
[src]
pub fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SafeBorrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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.
pub 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>,