Asteracea
Asteracea copied to clipboard
Finite constructor parameter lifetimes
It's currently not possible to accept values with a lifetime shorter than 'static in constructor arguments that are captured.
It should be possible to specify any number of lifetime parameters on a component and use them with constructor arguments, including ones associated with a field capture.
Alternatively, accepting 'self may be an option, though supporting this exclusively may cause issues where variance isn't present.
This almost works now ('a should be able to be specified.), but acquiring a DI marker token from the type currently requires 'static lifetime.