Implement Encoder/Decoder for libserialize traits