headers
headers copied to clipboard
Request expanded documentation on implementing `trait Header`
The impl Header for Dnt example is a good start, but it doesn't explain the actual semantics of the iterator-based design.
Example questions which would be nice to have answered in the documentation:
- Under what circumstances will the iterator provided to
fn decodecontain more than one value? - If a
decodeimplementation does not consume the provided iterator entirely, what happens to the remaining values?- Are they re-used to produce a new instance?
- Are they just discarded?
- Under what circumstances is it reasonable to emit more than one value in
fn encode? - Are the
encodeanddecodecircumstances symmetrical?