pub trait Validator: Send + Sync {
// Required methods
fn validate(&self, kind: &SlotKind, code: &str) -> Result<ValidationResult>;
fn format(&self, kind: &SlotKind, code: &str) -> Result<String>;
// Provided method
fn validate_with_slot(
&self,
_slot: &Slot,
code: &str,
) -> Result<ValidationResult> { ... }
}Expand description
Trait for implementing code validators and formatters.
Required Methods§
Provided Methods§
Sourcefn validate_with_slot(
&self,
_slot: &Slot,
code: &str,
) -> Result<ValidationResult>
fn validate_with_slot( &self, _slot: &Slot, code: &str, ) -> Result<ValidationResult>
Optional: Validate using the full slot context (for TDD).