pub fn with_finally<Ctx, R>(
ctx: &mut Ctx,
action: impl FnOnce(&mut Ctx) -> R,
finally: impl FnOnce(&mut Ctx),
) -> RExpand description
Performs the given action and then calls finally, returning the action’s result.
Useful for restoring states post running of an action.