Is it possible to implement two traits with conflicting method names in Rust? I know that it gives you a multiple applicable methods in scope
error, but is there a way to resolve this? For example, some languages handle multiple inheritance by allowing you to explicitly specify which one method should take precedence
You want Call expressions / Disambiguating Function Calls. The following are all equivalent:
let v = 32;
let _ = v.clone();
let _ = Clone::clone(&v);
let _ = <i32 as Clone>::clone(&v);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With