Skip to main content

Validator

Trait Validator 

Source
pub trait Validator {
    // Required methods
    fn validate(
        &self,
        content: &str,
        file_path: &str,
    ) -> Result<Vec<ValidationIssue>>;
    fn name(&self) -> &str;

    // Provided method
    fn version(&self) -> &str { ... }
}
Expand description

Trait for validators that can check package.py files.

Required Methods§

Source

fn validate( &self, content: &str, file_path: &str, ) -> Result<Vec<ValidationIssue>>

Validate the given content and return any issues found.

Source

fn name(&self) -> &str

Get the name of this validator.

Provided Methods§

Source

fn version(&self) -> &str

Get the version of this validator.

Implementors§