Generates a URL path from the provided data.
The data to use for generating the path
The generated URL path string
Attempts to match this path pattern against the input string.
The URL path to match against
A MatchResult indicating success or failure with extracted data
The number of dynamic data captures in this path pattern.
Static paths have 0 captures (e.g.,
path("/message/inbox")) Dynamic paths have 1+ captures (e.g.,path("/users", string("id"))has 1)This is useful for route specificity comparison: When multiple routes match the same input with equal remaining text, the route with fewer captures should be preferred as it is more specific.