macro_rules! immut2 {
($f:expr ; else $else:expr) => { ... };
($f:expr) => { ... };
}Expand description
Macro to wrap a FnMut with 2 arguments into a Fn.
This can wrap any FnMut with two arguments.
See immut1! and immut3! to support a different number of arguments.
ยงNote
If this function tries to call itself recursively (for example by
triggering an event in Cursive), the second call will be a no-op.
Enabling recursive calls would break the FnMut contract.
In addition, due to weird interaction between Higher-rank trait bounds and closures, you should use the result from the macro directly, and not assign it to a variable.