Trait vector::components::validation::Validator

source ·
pub trait Validator {
    // Required methods
    fn name(&self) -> &'static str;
    fn check_validation(
        &self,
        component_type: ComponentType,
        expectation: TestCaseExpectation,
        inputs: &[TestEvent],
        outputs: &[Event],
        telemetry_events: &[Event],
        runner_metrics: &RunnerMetrics,
    ) -> Result<Vec<String>, Vec<String>>;
}
Expand description

A component validator.

Validators perform the actual validation logic that, based on the given inputs, determine of the component is valid or not for the given validator.

Required Methods§

source

fn name(&self) -> &'static str

Gets the unique name of this validator.

source

fn check_validation( &self, component_type: ComponentType, expectation: TestCaseExpectation, inputs: &[TestEvent], outputs: &[Event], telemetry_events: &[Event], runner_metrics: &RunnerMetrics, ) -> Result<Vec<String>, Vec<String>>

Processes the given set of inputs/outputs, generating the validation results.

Additionally, all telemetry events received for the component for the validation run are provided as well.

Trait Implementations§

source§

impl From<StandardValidators> for Box<dyn Validator>

source§

fn from(sv: StandardValidators) -> Self

Converts to this type from the input type.

Implementors§