Skip to main content

explain_target

Function explain_target 

Source
pub fn explain_target(
    graph: &PackageGraph,
    selected_packages: &[usize],
    target_name: &str,
) -> Result<TargetExplanation, ExplainError>
Expand description

Build a TargetExplanation for target_name, scoped to the selected packages. Returns ExplainError::TargetNotFound if the name does not exist in any selected package, with a list of candidate names for the diagnostic.

ยงErrors

Returns ExplainError::TargetNotFound (with the available target names as candidates) when no selected package declares a target named target_name, and ExplainError::AmbiguousTargetName when more than one selected package declares it.