Introduce hex::display for Display’ing binary data in hex #78
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.
encode method allocates a new string which is wasteful if all one
wants to do is display the binary data using format! or related macro.
Introduce hex::Display wrapper with hex::display as its constructor
which wraps the binary data in an object that implements Display,
LowerHex, UpperHex and Debug and formats the data as hex. However, as
it uses buffers on stack, it performs no allocations.