Expand description
Vue Router’s location matching, for <RouterLink> and useRoute() on the server: part of
ferrovue’s runtime.
§Example
let router = ferrovue::Router::new(&["/", "/blog/:slug"]);
let route = router.at("/blog/hello");
let link = route.link("/blog/hello");
assert_eq!((link.href.as_str(), link.active, link.exact), ("/blog/hello", true, true));
assert!(!route.link("/").active);Structs§
- Link
- A
<RouterLink>’sto, resolved: whatRoute::link,Route::link_namedandRoute::link_pathreturn. - Route
- Where the reader is, which is what every link on the page is compared with.
- Route
Def - A route as the routes file lists it: a path, its name if it has one, whether it shows a
component, and the routes nested in it, rendered by the
<RouterView>in its component. - Router
- The routes, in the order vue-router tries them.
Enums§
- Query
- One value of
route.query, as vue-router parses it: a key may be absent, given without a value (?flag, which isnull), given once, or given more than once, which makes an array.
Functions§
- query_
into stringifyQuery, one key and value at a time:key=value, each encoded as vue-router encodes them, after a&whensearchalready holds a pair.