Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@jstarry This turned out to be a little trickier than I thought. I've verified that exposing the macros allows people to write their own extensions, but I couldn't really come up with any examples that weren't from real-life, so I just refer to the source filenames, which I think is a bad cop-out.
If you'd like, I can pull in the actual source from json.rs into macros.rs and rework it so it's an actual compiling documentation example. Replicated code feels bad to me though, although perhaps as an example it wouldn't be horrible if it got out of phase with the actual implementation of json.rs. I definitely didn't want to include the code I'm using to get the more compact representation for CBOR. However, I thought that mentioning the form of the macro that I used to get what I wanted might be useful, although I'm not a good judge.
So, I fully expect to do more work on this PR, but with a little additional guidance. However, I'm in no rush to get it merged.