-
Notifications
You must be signed in to change notification settings - Fork 310
feat: enable non-'static where possible #765
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
base: master
Are you sure you want to change the base?
Conversation
As a co-maintainer, I am very hesitant about merging breaking changes. I want to leave this up to people who have been involved with the project more (unfortunately that probably means there won't be a decision here for a long time). |
That's what I kind of thought when looking at this too, it's a breaking change. We could consider it for the next major release, but I don't know when that is. |
It's good progress at least though if you maintainers are happy with the change given the requirement that it is merged as part of the next major breaking release and not merged until then. |
Are there any labels that could be applied to this PR to ensure it doesn't get forgotten in vNext? |
Motivation
Currently, many tower service wrappers and layers are limited to working with
'static
types, which limits its usefulness when working with non-static
ally borrowed things to and from scoped tasks (e.g.async-scoped
).Solution
Remove the
'static
restrictions where possible, mostly by introducing lifetime parameters.This change excludes
Buffer
andBufferLayer
which are more difficult to make non-'static
.This PR replaces #732