(linear-router compiled-routes)(linear-router compiled-routes opts)Creates a linear-router from resolved routes and optional
expanded options. See router for available options, plus the following:
| key | description | 
|---|---|
| :reitit.trie/trie-compiler | Optional trie-compiler. | 
| :reitit.trie/parameters | Optional function to create empty map(-like) path parameters value from sequence of keys. | 
Creates a linear-router from resolved routes and optional expanded options. See [[router]] for available options, plus the following: | key | description | | -----------------------------|-------------| | `:reitit.trie/trie-compiler` | Optional trie-compiler. | `:reitit.trie/parameters` | Optional function to create empty map(-like) path parameters value from sequence of keys.
(lookup-router compiled-routes)(lookup-router compiled-routes opts)Creates a lookup-router from resolved routes and optional
expanded options. See router for available options.
Creates a lookup-router from resolved routes and optional expanded options. See [[router]] for available options.
(mixed-router compiled-routes)(mixed-router compiled-routes opts)Creates two routers: lookup-router or single-static-path-router for
static routes and [[segment-router]] for wildcard routes. All
routes should be non-conflicting. Takes resolved routes and optional
expanded options. See router for options.
Creates two routers: [[lookup-router]] or [[single-static-path-router]] for static routes and [[segment-router]] for wildcard routes. All routes should be non-conflicting. Takes resolved routes and optional expanded options. See [[router]] for options.
(quarantine-router compiled-routes)(quarantine-router compiled-routes opts)Creates two routers: mixed-router for non-conflicting routes
and linear-router for conflicting routes. Takes resolved routes
and optional expanded options. See router for options.
Creates two routers: [[mixed-router]] for non-conflicting routes and [[linear-router]] for conflicting routes. Takes resolved routes and optional expanded options. See [[router]] for options.
(compiled-routes this)(match-by-name this name)(match-by-name this name path-params)(match-by-path this path)(options this)(route-names this)(router-name this)(routes this)(router raw-routes)(router raw-routes opts)Create a Router from raw route data and optionally an options map.
Selects implementation based on route details. The following options
are available:
| key | description | 
|---|---|
| :path | Base-path for routes | 
| :routes | Initial resolved routes (default []) | 
| :data | Initial route data (default {}) | 
| :spec | clojure.spec definition for a route data, see reitit.specon how to use this | 
| :syntax | Path-parameter syntax as keyword or set of keywords (default #{:bracket :colon}) | 
| :expand | Function of arg opts => datato expand route arg to route data (defaultreitit.core/expand) | 
| :coerce | Function of route opts => routeto coerce resolved route, can throw or returnnil | 
| :compile | Function of route opts => resultto compile a route handler | 
| :validate | Function of routes opts => ()to validate route (data) via side-effects | 
| :conflicts | Function of {route #{route}} => ()to handle conflicting routes | 
| :exception | Function of Exception => Exceptionto handle creation time exceptions (defaultreitit.exception/exception) | 
| :router | Function of routes opts => routerto override the actual router implementation | 
Create a [[Router]] from raw route data and optionally an options map.
Selects implementation based on route details. The following options
are available:
| key          | description
| -------------|-------------
| `:path`      | Base-path for routes
| `:routes`    | Initial resolved routes (default `[]`)
| `:data`      | Initial route data (default `{}`)
| `:spec`      | clojure.spec definition for a route data, see `reitit.spec` on how to use this
| `:syntax`    | Path-parameter syntax as keyword or set of keywords (default #{:bracket :colon})
| `:expand`    | Function of `arg opts => data` to expand route arg to route data (default `reitit.core/expand`)
| `:coerce`    | Function of `route opts => route` to coerce resolved route, can throw or return `nil`
| `:compile`   | Function of `route opts => result` to compile a route handler
| `:validate`  | Function of `routes opts => ()` to validate route (data) via side-effects
| `:conflicts` | Function of `{route #{route}} => ()` to handle conflicting routes
| `:exception` | Function of `Exception => Exception ` to handle creation time exceptions (default `reitit.exception/exception`)
| `:router`    | Function of `routes opts => router` to override the actual router implementation(single-static-path-router compiled-routes)(single-static-path-router compiled-routes opts)Creates a fast router of 1 static route(s) and optional
expanded options. See router for available options.
Creates a fast router of 1 static route(s) and optional expanded options. See [[router]] for available options.
(trie-router compiled-routes)(trie-router compiled-routes opts)Creates a special prefix-tree router from resolved routes and optional
expanded options. See router for available options, plus the following:
| key | description | 
|---|---|
| :reitit.trie/trie-compiler | Optional trie-compiler. | 
| :reitit.trie/parameters | Optional function to create empty map(-like) path parameters value from sequence of keys. | 
Creates a special prefix-tree router from resolved routes and optional expanded options. See [[router]] for available options, plus the following: | key | description | | -----------------------------|-------------| | `:reitit.trie/trie-compiler` | Optional trie-compiler. | `:reitit.trie/parameters` | Optional function to create empty map(-like) path parameters value from sequence of keys.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |