Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
I've been trying to define a trait `Inherits<T>`, a trait `Extends{ type Parent }` and an arbitrary amount of scaffolding around it such that
- the scaffolding for a given type only has to acknowledge that type, its parent and the types of which it is a parent
- `T: Inherits<U>` if a chain of `Extends` leads from `T` to `U`
I suspect that this is impossible, but I'd seen Rust traits bent to do crazier things, so if you know of such a system or can come up with a way to implement it despite the orphan rules, I'd be over the moon.
rant
inheritance
traits
rust