lib.rs |
Windows GUID/CLSID/IID string and binary serialization
[`Guid`](struct.Guid.html) transparently wraps
[`GUID`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa373931(v=vs.85).aspx).
Implements `Display` and `FromStr` string conversion, also `Hash` and `Eq`.
Curly braces (`{}`) are optional for `FromStr`.
# serde #
Use the `guid_serde` feature to derive `Serialize` and `Deserialize`, you can then
derive them for structs containing `GUID` like so:
```
# fn main() {}
#
# #[cfg(feature = "guid_serde")]
# extern crate serde_derive;
# extern crate winapi;
#
# #[cfg(feature = "guid_serde")]
# mod test {
use guid_win::GUIDSerde;
use serde_derive::{Deserialize, Serialize};
use winapi::shared::guiddef::GUID;
#[derive(Serialize, Deserialize)]
struct SerdeTest {
#[serde(with = "GUIDSerde")]
guid: GUID,
}
# }
``` |
5169 |