Trait ValidationFormatter

Source
pub trait ValidationFormatter {
    // Required method
    fn format(&self, result: ValidationResult<'_>);
}
Expand description

Trait for formatting the results of a validation process.

This trait defines a method that must be implemented to format and display the results of validating a configuration file. The formatting implementation can vary depending on the use case, such as printing to the console, logging, or generating a report.

§Example

use editorconfiger::{ValidationFormatter, ValidationResult};

struct MyFormatter;

impl ValidationFormatter for MyFormatter {
    fn format(&self, result: ValidationResult) {
        // ...
    }
}

§Method

  • format - Formats the validation result.

§Parameters

  • result - The ValidationResult struct containing the details of the validation process.

Required Methods§

Source

fn format(&self, result: ValidationResult<'_>)

Implementors§