Class
builtins::Finally
Runs its action when the scope ends, however it ends — the body of a finally.
Functions
fn
Finally · 2 overloads
Take ownership of the action to run at scope exit.
Parameters
f | the callable to invoke from the destructor. |
Complexity
O(1).
Allocation
moves f into the guard.
Run the action.
Reached on every exit path — normal fall-through, return, break, or an exception unwinding through the scope, which is the whole point of a guard over a duplicated block.
Complexity
that of the action.
Allocation
that of the action.
