pub fn explain_package(
graph: &PackageGraph,
roots: &[usize],
name: &str,
active_patches: Option<&ActivePatchSet>,
lockfile: Option<&Lockfile>,
) -> Result<PackageExplanation, ExplainError>Expand description
Build a PackageExplanation for name. Returns
ExplainError::PackageNotFound when the name is not in the
resolved graph; returns
ExplainError::AmbiguousPackageName if a future graph
gains multiple packages with the same name from distinct
sources (today the resolver enforces unique names).
ยงErrors
Returns ExplainError::PackageNotFound (with the known package
names as candidates) when no package in graph matches name, and
ExplainError::AmbiguousPackageName when more than one package
shares that name.