#[repr(transparent)]pub struct Guid(_);
Expand description
[docs.microsoft.com] A 128-bit identifier used for COM interfaces, COM class objects, and various other purpouses.
Implementations
sourceimpl Guid
impl Guid
sourcepub const NULL: Self = {
const GUID: crate::Guid =
{
use crate::*;
const STR: &'static str =
"00000000-0000-0000-0000-000000000000";
let mut bytes = STR.as_bytes();
let mut digits: usize = 8;
loop {
if digits > 0
{
digits -= 1;
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
bytes = rest;
} else if *ch == b'-'
{
::core::panicking::panic_display(&"expected 8 hex digits in 1st group, but found a dash before that");
} else {
::core::panicking::panic_display(&"expected 8 hex digits in 1st group, but found something else");
}
} else {
::core::panicking::panic_display(&"expected 8 hex digits in 1st group, but reached the end of the string instead");
} } else { break; } };
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
::core::panicking::panic_display(&"expected `-` after 8 hex digits in 1st group, but found more than that");
} else if *ch == b'-'
{
bytes = rest;
} else {
::core::panicking::panic_display(&"expected `-` after 1st group of hex digits, but found something else");
}
} else {
::core::panicking::panic_display(&"expected `-` after 1st group of hex digits, but reached the end of the string instead");
}; let mut digits: usize = 4;
loop {
if digits > 0
{
digits -= 1;
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
bytes = rest;
} else if *ch == b'-'
{
::core::panicking::panic_display(&"expected 4 hex digits in 2nd group, but found a dash before that");
} else {
::core::panicking::panic_display(&"expected 4 hex digits in 2nd group, but found something else");
}
} else {
::core::panicking::panic_display(&"expected 4 hex digits in 2nd group, but reached the end of the string instead");
} } else { break; } };
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
::core::panicking::panic_display(&"expected `-` after 4 hex digits in 2nd group, but found more than that");
} else if *ch == b'-'
{
bytes = rest;
} else {
::core::panicking::panic_display(&"expected `-` after 2nd group of hex digits, but found something else");
}
} else {
::core::panicking::panic_display(&"expected `-` after 2nd group of hex digits, but reached the end of the string instead");
}; let mut digits: usize = 4;
loop {
if digits > 0
{
digits -= 1;
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
bytes = rest;
} else if *ch == b'-'
{
::core::panicking::panic_display(&"expected 4 hex digits in 3rd group, but found a dash before that");
} else {
::core::panicking::panic_display(&"expected 4 hex digits in 3rd group, but found something else");
}
} else {
::core::panicking::panic_display(&"expected 4 hex digits in 3rd group, but reached the end of the string instead");
} } else { break; } };
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
::core::panicking::panic_display(&"expected `-` after 4 hex digits in 3rd group, but found more than that");
} else if *ch == b'-'
{
bytes = rest;
} else {
::core::panicking::panic_display(&"expected `-` after 3rd group of hex digits, but found something else");
}
} else {
::core::panicking::panic_display(&"expected `-` after 3rd group of hex digits, but reached the end of the string instead");
}; let mut digits: usize = 4;
loop {
if digits > 0
{
digits -= 1;
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
bytes = rest;
} else if *ch == b'-'
{
::core::panicking::panic_display(&"expected 4 hex digits in 4th group, but found a dash before that");
} else {
::core::panicking::panic_display(&"expected 4 hex digits in 4th group, but found something else");
}
} else {
::core::panicking::panic_display(&"expected 4 hex digits in 4th group, but reached the end of the string instead");
} } else { break; } };
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
::core::panicking::panic_display(&"expected `-` after 4 hex digits in 4th group, but found more than that");
} else if *ch == b'-'
{
bytes = rest;
} else {
::core::panicking::panic_display(&"expected `-` after 4th group of hex digits, but found something else");
}
} else {
::core::panicking::panic_display(&"expected `-` after 4th group of hex digits, but reached the end of the string instead");
}; let mut digits: usize = 12;
loop {
if digits > 0
{
digits -= 1;
if let Some((ch, rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
bytes = rest;
} else if *ch == b'-'
{
::core::panicking::panic_display(&"expected 12 hex digits in 5th group, but found a dash before that");
} else {
::core::panicking::panic_display(&"expected 12 hex digits in 5th group, but found something else");
}
} else {
::core::panicking::panic_display(&"expected 12 hex digits in 5th group, but reached the end of the string instead");
} } else { break; } };
if let Some((ch, _rest)) = bytes.split_first()
{
if ch.is_ascii_hexdigit()
{
::core::panicking::panic_display(&"expected end of string after 12 hex digits in 5th group, but found more than that");
} else if *ch == b'-'
{
::core::panicking::panic_display(&"expected end of string after 12 hex digits in 5th group, but found a trailing dash instead");
} else {
::core::panicking::panic_display(&"expected end of string after 5th group of hex digits, but found something else");
}
} else { }; crate::Guid::_zzz_from_literal(STR) }; GUID }
pub const NULL: Self = { const GUID: crate::Guid = { use crate::*; const STR: &'static str = "00000000-0000-0000-0000-000000000000"; let mut bytes = STR.as_bytes(); let mut digits: usize = 8; loop { if digits > 0 { digits -= 1; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { bytes = rest; } else if *ch == b'-' { ::core::panicking::panic_display(&"expected 8 hex digits in 1st group, but found a dash before that"); } else { ::core::panicking::panic_display(&"expected 8 hex digits in 1st group, but found something else"); } } else { ::core::panicking::panic_display(&"expected 8 hex digits in 1st group, but reached the end of the string instead"); } } else { break; } }; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { ::core::panicking::panic_display(&"expected `-` after 8 hex digits in 1st group, but found more than that"); } else if *ch == b'-' { bytes = rest; } else { ::core::panicking::panic_display(&"expected `-` after 1st group of hex digits, but found something else"); } } else { ::core::panicking::panic_display(&"expected `-` after 1st group of hex digits, but reached the end of the string instead"); }; let mut digits: usize = 4; loop { if digits > 0 { digits -= 1; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { bytes = rest; } else if *ch == b'-' { ::core::panicking::panic_display(&"expected 4 hex digits in 2nd group, but found a dash before that"); } else { ::core::panicking::panic_display(&"expected 4 hex digits in 2nd group, but found something else"); } } else { ::core::panicking::panic_display(&"expected 4 hex digits in 2nd group, but reached the end of the string instead"); } } else { break; } }; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { ::core::panicking::panic_display(&"expected `-` after 4 hex digits in 2nd group, but found more than that"); } else if *ch == b'-' { bytes = rest; } else { ::core::panicking::panic_display(&"expected `-` after 2nd group of hex digits, but found something else"); } } else { ::core::panicking::panic_display(&"expected `-` after 2nd group of hex digits, but reached the end of the string instead"); }; let mut digits: usize = 4; loop { if digits > 0 { digits -= 1; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { bytes = rest; } else if *ch == b'-' { ::core::panicking::panic_display(&"expected 4 hex digits in 3rd group, but found a dash before that"); } else { ::core::panicking::panic_display(&"expected 4 hex digits in 3rd group, but found something else"); } } else { ::core::panicking::panic_display(&"expected 4 hex digits in 3rd group, but reached the end of the string instead"); } } else { break; } }; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { ::core::panicking::panic_display(&"expected `-` after 4 hex digits in 3rd group, but found more than that"); } else if *ch == b'-' { bytes = rest; } else { ::core::panicking::panic_display(&"expected `-` after 3rd group of hex digits, but found something else"); } } else { ::core::panicking::panic_display(&"expected `-` after 3rd group of hex digits, but reached the end of the string instead"); }; let mut digits: usize = 4; loop { if digits > 0 { digits -= 1; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { bytes = rest; } else if *ch == b'-' { ::core::panicking::panic_display(&"expected 4 hex digits in 4th group, but found a dash before that"); } else { ::core::panicking::panic_display(&"expected 4 hex digits in 4th group, but found something else"); } } else { ::core::panicking::panic_display(&"expected 4 hex digits in 4th group, but reached the end of the string instead"); } } else { break; } }; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { ::core::panicking::panic_display(&"expected `-` after 4 hex digits in 4th group, but found more than that"); } else if *ch == b'-' { bytes = rest; } else { ::core::panicking::panic_display(&"expected `-` after 4th group of hex digits, but found something else"); } } else { ::core::panicking::panic_display(&"expected `-` after 4th group of hex digits, but reached the end of the string instead"); }; let mut digits: usize = 12; loop { if digits > 0 { digits -= 1; if let Some((ch, rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { bytes = rest; } else if *ch == b'-' { ::core::panicking::panic_display(&"expected 12 hex digits in 5th group, but found a dash before that"); } else { ::core::panicking::panic_display(&"expected 12 hex digits in 5th group, but found something else"); } } else { ::core::panicking::panic_display(&"expected 12 hex digits in 5th group, but reached the end of the string instead"); } } else { break; } }; if let Some((ch, _rest)) = bytes.split_first() { if ch.is_ascii_hexdigit() { ::core::panicking::panic_display(&"expected end of string after 12 hex digits in 5th group, but found more than that"); } else if *ch == b'-' { ::core::panicking::panic_display(&"expected end of string after 12 hex digits in 5th group, but found a trailing dash instead"); } else { ::core::panicking::panic_display(&"expected end of string after 5th group of hex digits, but found something else"); } } else { }; crate::Guid::_zzz_from_literal(STR) }; GUID }
{00000000-0000-0000-0000-000000000000}
- the “null” guid
Trait Implementations
sourceimpl Ord for Guid
impl Ord for Guid
sourceimpl PartialOrd<Guid> for Guid
impl PartialOrd<Guid> for Guid
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Guid
impl Eq for Guid
impl Pod for Guid
Auto Trait Implementations
impl RefUnwindSafe for Guid
impl Send for Guid
impl Sync for Guid
impl Unpin for Guid
impl UnwindSafe for Guid
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more