I've got three functions with signatures like the following (slightly simplified below):
fn f<T>(f: impl Fn(&T), x : &impl ATrait<T>) {}
fn f<T>(f: impl Fn(&T), x : impl ATrait<T>) {}
fn f<T>(f: impl Fn(T), x : impl ATrait<T>) {}
Naturally as they're all named f
this won't compile but is there anyway I can give them the same name through traits+impls or other methods so I can do:
f(|&e| {}, &x);
f(|&e| {}, x);
f(|e| {}, x);
and it selects the correct overload based on argument type?