1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use *;
/// The generated documentation site, reduced to what route resolution
/// actually reads.
///
/// `build.rs` emits the site's data as `DocsSite` / `DocsPage` /
/// `DocsLocale` (`data::struct.rs`), and each page carries its whole
/// rendered body — the block AST, its heading TOC, its sidebar. None of
/// that is needed to answer "which page does this route name", and
/// binding the answer to it would make the routing rules untestable:
/// there is no way to construct a `DocsPage` without a browser-produced
/// block AST, so a site with a deliberately colliding page pair — the
/// one shape the normalisation must refuse to merge — could never be
/// described in a test at all.
///
/// These two types are the route layer's own view of the same generated
/// data: the locale prefixes and the route strings, nothing else.
/// `router::site()` projects the generated site onto them once, and every
/// normalisation rule is expressed against this view alone.
/// One locale of a [`RouteSite`].
/// One page route of a [`RouteSite`].