pub fn set_trigger_function(
    f: fn(crate_name: &'static str, file_name: &'static str, line_number: u32)
)
Expand description

This function will be called any time the FAULT_INJECT_COUNTER reaches 0 and an error is injected. You can use this to re-set the counter for deep fault tree enumeration, test auditing, etc…

The function accepts the crate name, file name, and line number as arguments.

Examples found in repository?
examples/fallible.rs (line 17)
16
17
18
19
20
21
22
23
fn main() -> io::Result<()> {
    set_trigger_function(trigger_fn);
    FAULT_INJECT_COUNTER.store(1, std::sync::atomic::Ordering::Release);

    fallible!(do_io());

    Ok(())
}