Skip to main content

UUID_PATTERN

Constant UUID_PATTERN 

Source
pub const UUID_PATTERN: &str = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
Expand description

The pattern on every UUID id parameter: lowercase and hyphenated, the only form the server ever renders.

Constrained decoders (drama_llama) enforce it, which fixes a length: an id can neither close a digit early nor run on into prose.