Crate compiled_uuid[−][src]
Expand description
Anywhere you’re building Uuid
s from a string literal, you should use uuid
.
Overview
compiled_uuid
exposes one macro called uuid
, which parses Uuid
s at compile time.
When you write this:
let id: Uuid = uuid!("F9168C5E-CEB2-4FAA-B6BF-329BF39FA1E4");
It expands to:
let id: Uuid = ::uuid::Uuid::from_bytes([
249u8, 22u8, 140u8, 94u8, 206u8, 178u8, 79u8, 170u8, 182u8, 191u8, 50u8, 155u8, 243u8,
159u8, 161u8, 228u8,
]);