Skip to content
  • François Laignel's avatar
    Buffer: serde: add a TODO for a future better design attempt · 68263ffc
    François Laignel authored and Sebastian Dröge's avatar Sebastian Dröge committed
    Serialization and deserialization are asymetrical: ser uses string literals
    and de uses a dedicated `struct`, leading to possible inconsistencies.
    
    The idea is to rely on a single `struct` for both ser and de. The only
    problem is that, in order to avoid unneeded copies, `buffer` requires an owned
    `ByteBuf` for de and a borrowed `Bytes` for ser. `Either` could help adapting
    to both situations.
    68263ffc