pub struct WorkspacePackage {
pub package: Package,
pub manifest_path: PathBuf,
pub manifest_dir: PathBuf,
pub deps: Vec<DependencyEdge>,
pub kind: PackageKind,
}Expand description
A single loaded package.
Fields§
§package: Package§manifest_path: PathBufAbsolute path to this package’s cabin.toml.
manifest_dir: PathBufAbsolute path to the directory containing manifest_path.
deps: Vec<DependencyEdge>Resolved package-dependency edges, in declaration order.
Each edge carries the index of the depended-on package
inside PackageGraph::packages together with the
DependencyKind under which it was declared.
Only kinds that participate in ordinary resolution
(Normal) appear here today: dev path-deps are
declaration-only and therefore never enter the package
graph. The kind is preserved per-edge so the resolver /
fetch / closure-walk callers can iterate all edges
consistently with future kinds.
kind: PackageKindWhether this package was loaded from a local source tree or from an extracted registry archive.
Implementations§
Source§impl WorkspacePackage
impl WorkspacePackage
Sourcepub fn deps_of_kind(
&self,
kind: DependencyKind,
) -> impl Iterator<Item = usize> + '_
pub fn deps_of_kind( &self, kind: DependencyKind, ) -> impl Iterator<Item = usize> + '_
Iterate dependency edges of a single kind. Used by the
build planner so cross-package target lookups stay limited
to Normal-kind edges.
Sourcepub fn all_dep_indices(&self) -> impl Iterator<Item = usize> + '_
pub fn all_dep_indices(&self) -> impl Iterator<Item = usize> + '_
Iterate all dependency edges as bare indices, in declaration order. Used by closure walks (resolve / fetch / metadata) that include every package-graph-resident kind.
Trait Implementations§
Source§impl Clone for WorkspacePackage
impl Clone for WorkspacePackage
Source§fn clone(&self) -> WorkspacePackage
fn clone(&self) -> WorkspacePackage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkspacePackage
impl Debug for WorkspacePackage
Source§impl PartialEq for WorkspacePackage
impl PartialEq for WorkspacePackage
Source§fn eq(&self, other: &WorkspacePackage) -> bool
fn eq(&self, other: &WorkspacePackage) -> bool
self and other values to be equal, and is used by ==.impl Eq for WorkspacePackage
impl StructuralPartialEq for WorkspacePackage
Auto Trait Implementations§
impl Freeze for WorkspacePackage
impl RefUnwindSafe for WorkspacePackage
impl Send for WorkspacePackage
impl Sync for WorkspacePackage
impl Unpin for WorkspacePackage
impl UnsafeUnpin for WorkspacePackage
impl UnwindSafe for WorkspacePackage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.