Skip to main content

Logger

Trait Logger 

Source
pub trait Logger: Send {
    // Required method
    fn log(&mut self, result: &ConditionResult, confidence: f64) -> Result<()>;

    // Provided methods
    fn start(&mut self, _info: &RunInfo) -> Result<()> { ... }
    fn finish(&mut self, _report: &RunReport) -> Result<()> { ... }
}
Expand description

A destination of the results.

Required Methods§

Source

fn log(&mut self, result: &ConditionResult, confidence: f64) -> Result<()>

After every condition (confidence: level of the intervals).

§Errors

comnum_core::Error::Io if the output cannot be written.

Provided Methods§

Source

fn start(&mut self, _info: &RunInfo) -> Result<()>

Before the first condition.

§Errors

comnum_core::Error::Io if the output cannot be created.

Source

fn finish(&mut self, _report: &RunReport) -> Result<()>

After the last condition.

§Errors

comnum_core::Error::Io if the output cannot be written.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§