How to generically implement a trait for all types that don't implement it yet

I have some trait A I want implemented for a bunch of objects, using generics. For some objects I want to have the trait implemented manually.
I would imagine something like this:

trait A {}
struct Manual {}
struct Generic1 {}
struct Generic2 {}
//etc
impl A for Manual {}
impl<T> a for T where T: !A { } 

Any help would be appreciated

I believe what you're looking for is specialization; in short it's not possible right now. You can see the current progress on implementing the feature here:

https://github.com/rust-lang/rust/issues/31844

Ok, thank you. I'll have to temporarily look for another way then

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.