Macro cursive_core::immut3
source · [−]macro_rules! immut3 {
($f:expr ; else $else:expr) => { ... };
($f:expr) => { ... };
}
Expand description
Macro to wrap a FnMut
with 3 arguments into a Fn
.
This can wrap any FnMut
with three arguments.
See immut1!
and immut2!
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.