-
Notifications
You must be signed in to change notification settings - Fork 221
Closed
Description
I am looking for a way to specify uuid literals in my code without having to do Uuid::parse_str("").unwrap(); at runtime. A good example for a different use case is the hex-literal crate (https://crates.io/crates/hex-literal) that makes is easy to specify hex literals with the hex!() macro. In this case, I would like to declare a UUID as a string like "cc58f58b-ca41-4678-b9f9-94ba4eeb9e1e" and have it checked for validity at compile-time to avoid the unwrap().
Maybe the best way would be to have the macro define a byte array to use Uuid::from_bytes() under the hood. Any thoughts?
dfaust and QnnOkabayashi
Metadata
Metadata
Assignees
Labels
No labels