#[repr(C)]pub struct GUID {
pub data1: u32,
pub data2: u16,
pub data3: u16,
pub data4: [u8; 8],
}
Expand description
Binary GUID format as defined for the COM interfaces.
Fields§
§data1: u32
§data2: u16
§data3: u16
§data4: [u8; 8]
Implementations§
Source§impl GUID
impl GUID
pub fn zero_guid() -> GUID
Sourcepub fn parse(guid: &str) -> Result<GUID, String>
pub fn parse(guid: &str) -> Result<GUID, String>
Parses the given string as a GUID.
Supported formats include:
- Braces and hyphens: {00000000-0000-0000-0000-000000000000}
- Hyphens only: 00000000-0000-0000-0000-000000000000
- Raw hexadecimal: 00000000000000000000000000000000
pub fn as_bytes(&self) -> &[u8; 16]
Trait Implementations§
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.