Skip to main content

call_with

Function call_with 

Source
pub fn call_with<T>(
    what: &str,
    budget: Budget,
    say: &mut dyn FnMut(&str),
    sleep: &mut dyn FnMut(Duration),
    op: impl FnMut() -> Result<T, Error>,
) -> Result<T, Error>
Expand description

call, with the clock and the voice injected so the budget can be tested without a test that sleeps.