Function redirect_fn
pub fn redirect_fn<F, E>(f: F) -> RedirectFn<F>
where
F: FnMut(&Attempt<'_>) -> Result<Action, E>,
Create a new redirection Policy from a closure
F: FnMut(&Attempt<'_>) -> Result<Action, E>.
[redirect][Policy::redirect] method of the returned Policy delegates to
the wrapped closure.