#windows #com #win32

guid_win

Windows GUID/CLSID/IID string and binary serialization

3 releases

0.1.0 Mar 21, 2019
0.1.0-alpha3 Mar 5, 2019
0.1.0-alpha2 Mar 3, 2019
0.1.0-alpha1 Mar 2, 2019

#67 in Windows APIs

Download history 12/week @ 2019-12-15 22/week @ 2019-12-22 16/week @ 2019-12-29 46/week @ 2020-01-05 103/week @ 2020-01-12 45/week @ 2020-01-19 17/week @ 2020-01-26 14/week @ 2020-02-02 28/week @ 2020-02-09 52/week @ 2020-02-16 60/week @ 2020-02-23 12/week @ 2020-03-01 33/week @ 2020-03-08 21/week @ 2020-03-15 41/week @ 2020-03-22 26/week @ 2020-03-29

1,423 downloads per month

MIT/Apache

8KB
117 lines


lib.rs:

Windows GUID/CLSID/IID string and binary serialization

Guid transparently wraps GUID.

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,
}
# }

Dependencies

~0.6–1MB
~22K SLoC