#windows #com #win32

guid_win

Windows GUID/CLSID/IID string and binary serialization

4 releases

Uses old Rust 2015

0.2.0 Dec 17, 2020
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

#95 in Windows APIs

Download history 35/week @ 2021-01-16 37/week @ 2021-01-23 18/week @ 2021-01-30 30/week @ 2021-02-06 51/week @ 2021-02-13 38/week @ 2021-02-20 31/week @ 2021-02-27 27/week @ 2021-03-06 35/week @ 2021-03-13 35/week @ 2021-03-20 36/week @ 2021-03-27 34/week @ 2021-04-03 51/week @ 2021-04-10 29/week @ 2021-04-17 17/week @ 2021-04-24 24/week @ 2021-05-01

147 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

~245KB