pub trait Validator: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn supports(&self, language: Language) -> bool;
fn validate_parsed(
&self,
code: &ParsedCode,
file: &Path,
) -> Result<ValidationResult>;
// Provided method
fn validate_raw(
&self,
source: &str,
file: &Path,
) -> Result<ValidationResult> { ... }
}Expand description
Validator trait
Required Methods§
Sourcefn validate_parsed(
&self,
code: &ParsedCode,
file: &Path,
) -> Result<ValidationResult>
fn validate_parsed( &self, code: &ParsedCode, file: &Path, ) -> Result<ValidationResult>
Validate parsed code
Provided Methods§
Sourcefn validate_raw(&self, source: &str, file: &Path) -> Result<ValidationResult>
fn validate_raw(&self, source: &str, file: &Path) -> Result<ValidationResult>
Validate raw source (fallback)