It is common to use lots of UUIDs to for different resources. It is among the only identifier I personally use where having compile-time enforced origin check would be really beneficial.
Consider adding a type-hint akin to #[string] for the Uuid type, with appropriate From<Uuid> implementations. That would greatly simplify converting into its microtype at places of origin.
If desirable, the uuid crate dependency can be locked behind a feature flag.
It is common to use lots of UUIDs to for different resources. It is among the only identifier I personally use where having compile-time enforced origin check would be really beneficial.
Consider adding a type-hint akin to
#[string]for theUuidtype, with appropriateFrom<Uuid>implementations. That would greatly simplify converting into its microtype at places of origin.If desirable, the
uuidcrate dependency can be locked behind a feature flag.