Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finite constructor parameter lifetimes #5

Open
Tamschi opened this issue Oct 9, 2020 · 1 comment
Open

Finite constructor parameter lifetimes #5

Tamschi opened this issue Oct 9, 2020 · 1 comment
Labels
accepted This will be worked on type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Milestone

Comments

@Tamschi
Copy link
Owner

Tamschi commented Oct 9, 2020

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.

@Tamschi Tamschi added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. accepted This will be worked on labels Oct 9, 2020
@Tamschi Tamschi added this to the v0.1.0 milestone Oct 9, 2020
@Tamschi
Copy link
Owner Author

Tamschi commented Dec 1, 2020

This almost works now ('a should be able to be specified.), but acquiring a DI marker token from the type currently requires 'static lifetime.

@Tamschi Tamschi closed this as completed Dec 1, 2020
@Tamschi Tamschi reopened this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This will be worked on type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
None yet
Development

No branches or pull requests

1 participant