[][src]Macro lib3h_zombie_actor::wait1_for_repeatable_callback

macro_rules! wait1_for_repeatable_callback {
    ($actor: ident, $ghost_can_track: ident, $request_fn: expr, $init_value: expr) => { ... };
    ($actor: ident, $ghost_can_track: ident, $request_fn: expr, $init_value: expr, $options: expr) => { ... };
}

Similar to wait1_for_callback! but will invoke the callback multiple times until success. Users need provide a closure $request_fn that takes a user defined state and produces a triple of (request_to_other, regex, new_state). If the request fails to produce the matching regex, the closure will be invoked again with new_state instead of state. This will continue until success or a finite number of failures has been reached.

If $should_abort is false, the function returns a tuple ``(is_match, final_state)whereis_matchindicates whether the regexed match andfinal_state` contains the final state produced by the closure.