Skip to content

Response lifetimes #2531

Answered by seanmonstar
haydnv asked this question in Q&A
Apr 30, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

What sort of data do you need to borrow? Do you mean a slice of bytes? Could you store those bytes in a hyper::body::Bytes, and then just make clones of for the body? It's a reference counted buffer, so it's cheap for you to do that. Otherwise, I'd need more info to be able to better suggest a solution.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@haydnv
Comment options

Answer selected by seanmonstar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants