pub struct Guid {
pub data1: u32,
pub data2: u16,
pub data3: u16,
pub data4: [u8; 8],
}Expand description
A Windows globally unique identifier (GUID).
Mirrors the fields of the native GUID struct (Data1/Data2/Data3/
Data4) rather than an opaque byte packet.
Parse and format it using the canonical hyphenated form:
use dolang_winterop::guid::Guid;
let guid: Guid = "00112233-4455-6677-8899-aabbccddeeff".parse()?;
assert_eq!(guid.to_string(), "00112233-4455-6677-8899-aabbccddeeff");Fields§
§data1: u32§data2: u16§data3: u16§data4: [u8; 8]Implementations§
Trait Implementations§
impl Copy for Guid
Source§impl<'de> Deserialize<'de> for Guid
impl<'de> Deserialize<'de> for Guid
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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