Check

Trait Check 

Source
pub trait Check {
    // Required method
    fn check(&self, f: &mut dyn FnMut(&Outcome<'_>));

    // Provided method
    fn check_ok(&self, f: &mut dyn FnMut(&Outcome<'_>)) -> Summary { ... }
}
Expand description

A trait for checks that can be implemented.

Required Methods§

Source

fn check(&self, f: &mut dyn FnMut(&Outcome<'_>))

Runs the check.

This is the only method that is required by implementors.

The implementation should call f for each check that was run, so that the caller gets notified about the outcome.

Provided Methods§

Source

fn check_ok(&self, f: &mut dyn FnMut(&Outcome<'_>)) -> Summary

Run the check and return a summary.

This method runs the check and records the calls to the f parameter, collecting a summary over all of them.

Implementors§