#[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§
Source§impl<TS: TypeSystem> ExternInput<TS> for GUID
impl<TS: TypeSystem> ExternInput<TS> for GUID
Source§impl<TS: TypeSystem> ExternOutput<TS> for GUID
impl<TS: TypeSystem> ExternOutput<TS> for GUID
fn into_foreign_output(self) -> ComResult<Self::ForeignType>
Source§unsafe fn from_foreign_output(source: Self::ForeignType) -> ComResult<Self>
unsafe fn from_foreign_output(source: Self::ForeignType) -> ComResult<Self>
Safety Read more
Source§unsafe fn drop_foreign_output(source: Self::ForeignType)
unsafe fn drop_foreign_output(source: Self::ForeignType)
Safety Read more
Source§impl<TS: TypeSystem> ExternType<TS> for GUID
impl<TS: TypeSystem> ExternType<TS> for GUID
type ForeignType = GUID
Source§impl ForeignType for GUID
impl ForeignType for GUID
Source§impl<TS: TypeSystem> InfallibleExternInput<TS> for GUID
impl<TS: TypeSystem> InfallibleExternInput<TS> for GUID
type Lease = ()
type Owned = GUID
Source§unsafe fn into_foreign_parameter(self) -> (Self::ForeignType, ())
unsafe fn into_foreign_parameter(self) -> (Self::ForeignType, ())
Safety Read more
Source§unsafe fn from_foreign_parameter(source: Self::ForeignType) -> Self::Owned
unsafe fn from_foreign_parameter(source: Self::ForeignType) -> Self::Owned
Safety Read more
Source§impl<TS: TypeSystem> InfallibleExternOutput<TS> for GUID
impl<TS: TypeSystem> InfallibleExternOutput<TS> for GUID
fn into_foreign_output(self) -> Self::ForeignType
Source§unsafe fn from_foreign_output(source: Self::ForeignType) -> Self
unsafe fn from_foreign_output(source: Self::ForeignType) -> Self
Safety 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 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<T> ExternDefault for T
impl<T> ExternDefault for T
Source§unsafe fn extern_default() -> T
unsafe fn extern_default() -> T
Safety Read more