pub trait GraphValidator {
// Required methods
fn name(&self) -> &'static str;
fn check(&self, graph: &PackGraph) -> Vec<PackValidationError>;
}Expand description
Plan-phase validator that operates on an assembled PackGraph.
Separate trait from Validator on purpose: graph-level checks need
the full graph, not a single manifest, and mixing the two into one
trait would force every per-manifest validator to accept a graph it
doesn’t need. Two traits keep each call site’s surface minimal and
type-safe.
Required Methods§
Sourcefn check(&self, graph: &PackGraph) -> Vec<PackValidationError>
fn check(&self, graph: &PackGraph) -> Vec<PackValidationError>
Inspect graph and emit zero or more errors.