Skip to main content

PackValidator

Trait PackValidator 

Source
pub trait PackValidator {
    // Required methods
    fn id(&self) -> &'static str;
    fn applies(&self, manifest: &PackManifest) -> bool;
    fn validate(&self, manifest: &PackManifest) -> Vec<Diagnostic>;
}
Expand description

Validator for pack manifests that emits diagnostics.

Required Methods§

Source

fn id(&self) -> &'static str

Returns the stable validator identifier.

Source

fn applies(&self, manifest: &PackManifest) -> bool

Returns true when the validator applies to the provided manifest.

Source

fn validate(&self, manifest: &PackManifest) -> Vec<Diagnostic>

Validates the manifest and returns diagnostics.

Implementors§