pub trait Validator {
// Required methods
fn validate(&self, context: &ValidationContext<'_>) -> ValidationResult;
fn get_validation_rules(&self) -> Vec<ValidationRule>;
fn get_severity(&self) -> ValidationSeverity;
// Provided method
fn supports_incremental(&self) -> bool { ... }
}Expand description
Core trait for validators
Required Methods§
Sourcefn validate(&self, context: &ValidationContext<'_>) -> ValidationResult
fn validate(&self, context: &ValidationContext<'_>) -> ValidationResult
Validate content against rules
Sourcefn get_validation_rules(&self) -> Vec<ValidationRule>
fn get_validation_rules(&self) -> Vec<ValidationRule>
Get validation rules supported by this validator
Sourcefn get_severity(&self) -> ValidationSeverity
fn get_severity(&self) -> ValidationSeverity
Get the severity level for this validator
Provided Methods§
Sourcefn supports_incremental(&self) -> bool
fn supports_incremental(&self) -> bool
Whether this validator supports incremental validation