Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: POC header comment API design (#332)
# Motivation Inspired by #307, can we design a nice API to read/write comments of header cards? # Changes * `write_key` takes either a simple value, or a tuple of (value, comment) for writing comments * `read_key` returns a new structured type which contains both the value and comment * tests and docs updated * restructure the headers code * create new `headers` module with previous code * add `constants` module, mostly with header related lengths * add `header_value` module defining the `HeaderValue<T>` type along with its std trait implementations # TODO * [x] `write_key` support * [x] `read_key` support * [x] perform assertions on header card lengths * [x] rewrite the change in a backwards compatible way - [x] writing a header value is backwards compatible already - [x] make `read_key` take either a primitive value (backwards compatible) or `HeaderValue<_>` * [x] remove public access to `HeaderValue` internals? Or remove methods * decifded to keep fields as the type should be simple
- Loading branch information