I can put a function in a variable, and call/invoke it by calling that variable with ()
as:
fn read(){}
main() {
let f1: fn() = read;
if true { f1() } else { println!("Sorry"); }
}
Can I do the same with macros! something like this:
macro_rules! hi{
($name:expr) => {
format!("Hi {}", $name);
}
}
main() {
let m1: ??? = hi;
if true { m1!() } else { println!("Sorry"); }
}