Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does msgpack-rust support Deserialize/Serialize UUID for struct? #314

Open
measproem opened this issue Sep 7, 2022 · 4 comments
Open

Does msgpack-rust support Deserialize/Serialize UUID for struct? #314

measproem opened this issue Sep 7, 2022 · 4 comments

Comments

@measproem
Copy link

Hi
I am new, does Msgpack-rust support Deserialize/Serialize for struct contain field data type uuid

Thank

@kornelski
Copy link
Collaborator

It supports every Rust type that implements serde's Serialize/Deserialize.

Often you need to enable a Cargo feature of that types' crate to enable support.

@measproem
Copy link
Author

I already enabled on Cargo file but for implement code can I have sample code? I tried many hours in google no luck.
I also looked to this: #[serde(with)]

@kornelski
Copy link
Collaborator

kornelski commented Sep 7, 2022

If you enable uuid/serde feature, it should just work. No attributes. It's supposed to serialize itself as easily as a String.

@measproem
Copy link
Author

Let me check more thank your replied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants