Is there some way to implement a trait on multiple traits?
问题 Why doesn't this work: trait Update { fn update(&mut self); } trait A {} trait B {} impl<T: A> Update for T { fn update(&mut self) { println!("A") } } impl<U: B> Update for U { fn update(&mut self) { println!("B") } } error[E0119]: conflicting implementations of trait `Update`: --> src/main.rs:14:1 | 8 | impl<T: A> Update for T { | ----------------------- first implementation here ... 14 | impl<U: B> Update for U { | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation I would assume it is