Skip to content

feat(server,http1,http2,upgrade): remove body static lifetime constraint#4045

Open
Voldemat wants to merge 1 commit intohyperium:masterfrom
Voldemat:master
Open

feat(server,http1,http2,upgrade): remove body static lifetime constraint#4045
Voldemat wants to merge 1 commit intohyperium:masterfrom
Voldemat:master

Conversation

@Voldemat
Copy link
Copy Markdown

Before this change, hyper expects body trait implementation to have 'static lifetime, which prevents use cases where one might have StreamBody that references certain state that outlives hyper connection object. This change adds lifetime parameter 'body to varies hyper objects that replaces 'static.

This change contains no breaking changes for existing use cases, however it requires appropriate change in hyper-util crate

Before this change, hyper expects body trait implementation to have
'static lifetime, which prevents use cases where one might have
StreamBody that references certain state that outlives hyper connection
object. This change adds lifetime parameter 'body to varies hyper
objects that replaces 'static.

This change contains no breaking changes for existing use cases, however it
requires appropriate change in hyper-util crate

Signed-off-by: Vladimir Voitenko <vladimirdev635@gmail.com>
@Voldemat
Copy link
Copy Markdown
Author

here is link to hyper-util pr with corresponding changes there: hyperium/hyper-util#278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant