The `Route module helps with building routes
type route = [ | `String of string |
| `Int of string |
| `Float of string |
| `Path of string |
| `Match of string * string |
| `Route of route list |
]The route type allows for URL routes to be built using strong types
val route_cache : (route, Str.regexp) Hashtbl.tThe route cache allows the route -> regexp process to be memoized
val of_string : string ‑> [> `Route of [> `Float of string | `Int of string | `Match of string * string | `Path of string | `String of string ] list ]"/user/<name:int>" -> `Path "user", `Int "name"
val variables : [< `Float of 'b | `Int of 'c | `Match of 'd | `Path of 'e | `Route of 'a list | `String of 'f Route ] as a ‑> 'a listReturns a list of variables found in a route
val params : [< `Float of 'b | `Int of 'b | `Match of 'b * 'c | `Path of 'd | `Route of 'a list | `String of 'b Route ] as a ‑> string ‑> ('b, [> `Float of string | `Int of string | `String of string ]) Hashtbl.tGet a parameters after a successful route match
val int : ('a, [> `Float of string | `Int of string | `Match of 'b * string | `String of string ]) Hashtbl.t ‑> 'a ‑> intGet a single parameter as int by name
val float : ('a, [> `Float of string | `Int of string | `Match of 'b * string | `String of string ]) Hashtbl.t ‑> 'a ‑> floatGet a single parameter as float by name
val string : ('a, [> `Float of string | `Int of string | `Match of 'b * string | `String of string ]) Hashtbl.t ‑> 'a ‑> stringGet a single parameter as string by name