This may be a XY problem question, so please bear with me.
I have a trait (DoProducer) whose function returns trait objects implementing another trait (Do).
I would like an implementer to be able to return a subtrait of Do (DoMore). The compiler complains about the function signatures not matching.
I don't strictly need this to be a subtrait. Rather I want to be able to say "this implementation of DoProducer returns something that promises to implement Do and DoMore". How do I express this?
This is a playground for a "non-subtrait" implementation, which runs into the error of not being able to add non-auto traits. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8aa56e452033b6c6b8c27220e6c32693
Alternatively, is there some other way to achieve a similar result?