I'm rust freshman
I want to use hashmap key to call funtion like below
let map = HashMap::from([("add", func_add), ("sub", func_sub)]);
if let Some(func) = map.get("add") {
func();
}
else {}
functions in different keys may have different parameter quantities and types
Does this possible in rust?
If not, how can I call a function without fuction name(memory address or something)