Skip to main content

OutputHandler

Trait OutputHandler 

Source
pub trait OutputHandler: Send + Sync {
    // Required methods
    fn handle_result(&self, result: &TestResult) -> Result<(), Error>;
    fn handle_error(&self, error: &Error) -> Result<(), Error>;
}
Expand description

Trait for handling test results output.

Enables dependency injection for different output strategies and easier testing.

Required Methods§

Source

fn handle_result(&self, result: &TestResult) -> Result<(), Error>

Handle a completed test result.

Source

fn handle_error(&self, error: &Error) -> Result<(), Error>

Handle an error during testing.

Implementors§