bincode: Adding a specific u8 in between each Struct

#1

Hey,

I want to bincode a Struct (serialize), i’d like to add b"47" (u8) in between each fields. (about 7 fields)

I also want when I’m ready for Deserialization, to remove those specific b"47", anyone have a working example of how to remove specific u8 (multiple) from a &[u8] slices?

PS: Note that my Struct doesn’t contain the char / (b"47") so I can conflict with anything existing
Thanks for the help guys :slight_smile:

#2

That’s a change to the serialization format. I think you’ll have to fork bincode to add it.