How to serialize existing types? #954
Unanswered
marvin-hansen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thank you for your work on the Prost crate!
The documentation states that Prost can serialize existing types,
but I can't find any example or any further elaboration on how to do that.
The way I understand the process, and please correct me if I am wrong,
the first step is the proto file, the run the generate function, look at the generated Rust code,
and then annotate your existing types with all the proto tags to match the generated code so that you
can use existing types instead of converting back and forth between internal types and rust proto binding types.
Is that correct?
If not, what's the correct way to serialize existing types?
I did searched all open and closed discussion, but I was unable to find any clue.
In the issue tracker, I only found one issue discussing a fix to the Readme code example, which seems to imply that Rust defined types can be serialized even without a proto spec.
I am bit lost here.
Please help or share a bit of experience?
Thank you,
Marvin
Beta Was this translation helpful? Give feedback.
All reactions