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

Request expanded documentation on implementing trait Header #144

Open
coriolinus opened this issue Aug 17, 2023 · 0 comments
Open

Request expanded documentation on implementing trait Header #144

coriolinus opened this issue Aug 17, 2023 · 0 comments

Comments

@coriolinus
Copy link

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?
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

1 participant