@jalcine I don't know enough to answer this question, but I'd start by first changing the code so the tauri::generate_handler! result is stored in a let var before being passed into the function, then doing type inference (IDE or let () = varname), just to see what it is you've really got.
I did some google poking and found other examples where people fixed an error like this by putting the value in a Box<>. And another example where an error message like this turned out to be a compiler bug D: