Expand description
The code reference: a page for every module, type and function of the code a site names, in the style of DocC — made from the code itself, live, and never written to disk.
A site enables it as the system extension code, one namespace per
language:
extensions:
code:
config:
rust:
files: ["../core/src/**/*.rs"]Each file is parsed by its namespace’s grammar and query ([extract]),
every file’s declarations are linked into items ([rust]), and a
item’s page is rendered on request ([render]) at
<site folder>/reference/<namespace>/<path>. A save re-parses that one
file and links again in memory; nothing is cached on disk.
Structs§
- Declaration
- What one file says about one thing.
- Extracted
- What one file says: its own doc comment and its declarations, in the order they are written.
- Grammar
- A language’s parser: its grammar, the query that finds declarations, and how its doc comments read.
- Index
- The code reference of one site.
- Item
- One thing of the code, after every file is linked: a module, a type, a function — what a reference page is about.
- Items
- Every item of a namespace, by path, and the paths
pub usemakes another name for. - Member
- A part of an item shown on its page: a field, a variant, a method.
- Prose
- A Markdown file headed
#rust:path: what it adds to that item’s page. - Searched
- One page of a code reference, as search reads it.
Enums§
- Page
- What a page address of the code reference names.
- Visibility
- How a declaration is visible where it is written.
Functions§
- at
- The code reference whose pages lie where
path— a lexical path in the served folder — is: its nearest site’s, when that site has one andpathis under itsreference/. - changed
- Brings every code reference of
servedup to date afterfileschanged: each changed source file parsed again, each namespace linked again. Whether any page may now read differently. - configure
- Enables the code reference of the site whose document file is
doc, in the folderbase, from itsconfig— or disables it whenconfigisNone. Loading the same configuration again keeps the index. - for_
document - The code reference of the site whose document file is
doc, if it has one. - forget
- Forgets every code reference of a document under
folder: for server mode, a version it no longer holds, whose items would otherwise stay in memory for good. - input_
roots - Every folder a code reference of
servedreads from: watched whatever the site’swatchlist or.gitignoresays.