http
http copied to clipboard
Cow<'a> style headers support
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?
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).