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 decode contain more than one value?
- If a
decode implementation 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
encode and decode circumstances symmetrical?
The
impl Header for Dntexample 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:
fn decodecontain more than one value?decodeimplementation does not consume the provided iterator entirely, what happens to the remaining values?fn encode?encodeanddecodecircumstances symmetrical?