Motivation:
We had a proliferation of decode/encode methods that required users to
tell us how to encode their structured header field. This is a bit
annoying for two reasons: firstly, it requires users to encode this
piece of information separately from their header field; secondly, it
makes it very hard to offer a generic interface to load something as a
structured header field!
Modifications:
- Add a new StructuredHeaderField protocol that refines Codable and
expresses what type of header field is used.
- Remove the fancy encode/decode methods.
Result:
Simpler interfaces.