Skip to main content

EventProcessorEvaluation

Trait EventProcessorEvaluation 

pub trait EventProcessorEvaluation: Send {
    type ItemTest: ItemLazy;

    // Required methods
    fn process_test(
        &mut self,
        event: EvaluatorEvent<Self::ItemTest>,
    ) -> Result<(), EventProcessorError>;
    fn renderer(self) -> Box<dyn MetricsRenderer>;

    // Provided method
    fn flush(&mut self) -> Result<(), EventProcessorError> { ... }
}
Expand description

Process events happening during evaluation.

Required Associated Types§

type ItemTest: ItemLazy

The test item.

Required Methods§

fn process_test( &mut self, event: EvaluatorEvent<Self::ItemTest>, ) -> Result<(), EventProcessorError>

Collect a test event.

§Errors

Returns a EventProcessorError listing every metric that could not process the event. The other metrics still processed it. Note that an asynchronous processor reports it on a later call instead (see AsyncProcessorEvaluation).

fn renderer(self) -> Box<dyn MetricsRenderer>

Returns the renderer used for evaluation.

Provided Methods§

fn flush(&mut self) -> Result<(), EventProcessorError>

Wait until previously submitted events are processed (no-op for sync processors).

§Errors

Returns a EventProcessorError listing every metric failure among the events processed since the last error was reported.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§