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

Cow<'a> style headers support #754

Open
nyurik opened this issue Mar 1, 2025 · 1 comment
Open

Cow<'a> style headers support #754

nyurik opened this issue Mar 1, 2025 · 1 comment

Comments

@nyurik
Copy link

nyurik commented Mar 1, 2025

In some cases, I may already own the pre-allocated readonly &[u8] with the header name/values. How difficult would it be to support the case to create a HeaderName<'a> and HeaderValue<'a> that does not allocate its own memory when not needed?

@seanmonstar
Copy link
Member

Quite unlikely. The lifetime pervades all the other types, and is even a breaking change (I can't remember if you can set defaults, but likely messes with the generic on Request and Response).

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

No branches or pull requests

2 participants