Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Yurt_routeSourceThe `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
The route cache allows the route -> regexp process to be memoized
Convert a route to regexp
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
val json_of_route :
([< `Float of string
| `Int of string
| `Match of 'b * string
| `Path of string
| `Route of 'a list
| `String of string ] as 'a) ->
Ezjsonm.valueval to_json :
('a,
[< `Float of string
| `Int of string
| `Match of 'c * string
| `Path of string
| `Route of 'b list
| `String of string ] as 'b)
Hashtbl.t ->
[> `O of ('a * Ezjsonm.value) list ]