#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

#72 in Windows APIs

Download history 50/week @ 2022-01-24 26/week @ 2022-01-31 46/week @ 2022-02-07 31/week @ 2022-02-14 26/week @ 2022-02-21 40/week @ 2022-02-28 34/week @ 2022-03-07 50/week @ 2022-03-14 47/week @ 2022-03-21 25/week @ 2022-03-28 42/week @ 2022-04-04 24/week @ 2022-04-11 28/week @ 2022-04-18 48/week @ 2022-04-25 61/week @ 2022-05-02 29/week @ 2022-05-09

168 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

~225KB