Is it impossible to serialize / deserialize dyn traits?

I understand that with serde / bincode, it is fairly easy to serialize/deserialize structs / enums.

Is it basically imposible to serialize / deserialize Boc<dyn trait> ? Even if the two 'programs' is the same program code ran twice, on the same arch, on different machines ? (So they have the same enums, structs, traits, and layouts).

Typetag may do what you want

Otherwise you can probably use erased-serde to build a custom solution

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.