I am trying to use rmp-serde (0.13) to decode a msgpack data item written by the python app Borg Backup (the repository keys to start with). It seems that Borg (and/or python’s msgpack library) is perfectly happy to encode binary data as a “string” type in msgpack, rather than as binary data.
If I decode using rmpv to a
Value, these fields decode as a string, and the bytes can be extracted with the
However, if I use rmp-serde, I can’t come up with a field type that can possibly decode these. Even if I specify the type of the field as
Vec<u8>, it still fails with a
Any recommendations on how this should be handled? The rmpv documentation suggests that strings may indeed be invalid, so is this a problem with rmp-serde?