macro_rules! guid {
($s:literal) => { ... };
}
Expand description
Create a Guid
from a string at compile time.
use uguid::{guid, Guid};
assert_eq!(
guid!("01234567-89ab-cdef-0123-456789abcdef"),
Guid::new(
0x01234567_u32.to_le_bytes(),
0x89ab_u16.to_le_bytes(),
0xcdef_u16.to_le_bytes(),
0x01,
0x23,
[0x45, 0x67, 0x89, 0xab, 0xcd, 0xef],
)
);