flowd icon indicating copy to clipboard operation
flowd copied to clipboard

Less struct duplication

Open ERnsTL opened this issue 2 years ago • 0 comments

Problem:

  • struct duplication with just minor differences
  • many structs, some even just for "with token, without token" -> 2 structs
  • some structs like packet and packetsent are duplication
  • ability to adapt to custom fields as struct members
  • more?

Solutions:

  • partial serialization? -> https://github.com/raftario/serde-partial
    • performance impact? does it compile down to 2 struct variants internally or is it runtime cost?

ERnsTL avatar Dec 29 '22 20:12 ERnsTL