Function set_trigger_function

Source
pub fn set_trigger_function(f: Trigger)
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)
16fn main() -> io::Result<()> {
17    set_trigger_function(trigger_fn);
18    FAULT_INJECT_COUNTER.store(1, std::sync::atomic::Ordering::Release);
19
20    fallible!(do_io());
21
22    Ok(())
23}