3Hren / msgpack-rust

MessagePack implementation for Rust / msgpack.org[Rust]
MIT License
1.17k stars 130 forks source link

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

Open measproem opened 2 years ago

measproem commented 2 years ago

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

Thank

kornelski commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

measproem commented 2 years ago

Let me check more thank your replied