Closed
Description
Some encoding protocols don't enforce UTF8 in strings. In this cases, it would be useful to provide functions to encode/decode a string as an array of bytes (maybe something like read_bytestring
and emit_bytestring
).
An example of this situation is the bencode protocol. Currently, the only way to decode a struct containig a byte string is to implement a special trait called FromBencode
.
Another use case for this is to (de)serialize XML (see this subreddit thread)
Should I submit a PR to add this?
Metadata
Metadata
Assignees
Labels
No labels