#[repr(C)]pub struct Guid {
pub data1: u32,
pub data2: u16,
pub data3: u16,
pub data4: [u8; 8],
}Expand description
Binary-compatible with the GUID struct declared in com.h.
Fields§
§data1: u32§data2: u16§data3: u16§data4: [u8; 8]Implementations§
Source§impl Guid
impl Guid
pub const ZERO: Guid
pub const fn new(data1: u32, data2: u16, data3: u16, data4: [u8; 8]) -> Self
Sourcepub const fn from_u128(v: u128) -> Self
pub const fn from_u128(v: u128) -> Self
Builds a GUID from its 128-bit big-endian textual value, e.g.
Guid::from_u128(0x809c652e_7396_11d2_9771_00a0c9b4d50c).
Sourcepub fn parse(s: &str) -> Option<Guid>
pub fn parse(s: &str) -> Option<Guid>
Parses xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (braces optional).
Sourcepub const fn as_com_h_materialized(&self) -> Guid
pub const fn as_com_h_materialized(&self) -> Guid
The value native libraries built before the com.h fix materialize for this IID.
The __IID_DEF macro of com.h used to initialize Data4 as
{d41, d42, d42, d42, d42, d42, d42, d42}: the second byte was repeated
instead of using bytes 3..8. Native QueryInterface implementations
memcmp against those constants, so an older native library answers this
form; current ones answer the IDL value. Both are accepted and tried.
Trait Implementations§
impl Copy for Guid
impl Eq for Guid
impl StructuralPartialEq for Guid
Auto Trait Implementations§
impl Freeze for Guid
impl RefUnwindSafe for Guid
impl Send for Guid
impl Sync for Guid
impl Unpin for Guid
impl UnsafeUnpin for Guid
impl UnwindSafe for Guid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more