Module catalog
Expand description
The catalog generator: docs/reference/catalog.md from the facade’s own
module re-export lists.
Which list. The facade exports its catalogue twice: flat at the crate root
(atune::Random, the prelude’s working set) and again inside
atune::{sampler,scheduler,storage}. D33 names the module lists as the
source of truth, because those are the paths the guide links to and the only
ones that carry the feature-gated entries — atune::storage::SqliteStorage
exists, atune::SqliteStorage does not.
Why this generator fails rather than reconciles. §1.3.17 measured the two
lists disagreeing: FreezeThaw was exported at the crate root and from the
prelude while atune::scheduler omitted it, so one spelling of the same type
compiled and the other did not. A generator that picked whichever list was
longer would have published a plausible page over a real bug (§7 constraint 3).
So this one checks three invariants before it renders a line, and each is a
shape of that same defect:
- every implementor of
Sampler,SchedulerorStoragethatatune_corere-exports, or that the facade itself defines, appears in the matching facade module — the check that would have caughtFreezeThaw; - every name the crate root re-exports from an
atune_coremodule also appears in that facade module, so the flat list can never again name something the module list does not; - every name in the prelude is also at the crate root, which is what the crate root’s own comment claims.
Structs§
- Catalog
- Generates the sampler/scheduler/storage catalog page.
- Declaration 🔒
- A public type declaration: what a summary and a source citation come from.
- Export 🔒
- One entry of a facade module’s re-export list.
- Section 🔒
- One section of the page: a facade module, the trait its entries implement, and the prose that introduces them.
Constants§
- CORE 🔒
- The model crate the facade re-exports from.
- FACADE 🔒
- The facade, whose module re-export lists are the source of truth (D33).
- GENERATOR 🔒
- This generator’s name, for fail-closed error messages.
- SECTIONS 🔒
- The three catalogues, in the order the page presents them.
Functions§
- cell 🔒
- Escapes a summary for a table cell.
- check_
flat_ 🔒list_ agrees - Invariant 2: the crate root’s flat list may not name anything its module does not.
- check_
prelude_ 🔒agrees - Invariant 3: the prelude may not name anything the crate root does not.
- collect_
exports 🔒 - Flattens one
pub useinto its leaf names, keeping the path and the gate. - declarations 🔒
- Every public type declaration in the two crates, by name.
- facade_
modules 🔒 - Every
pub modof the facade’slib.rs, with its re-export list. - feature_
cell 🔒 - How a table cell says which feature gates an entry.
- implementors 🔒
- Every
pubtype in the two crates that implements one of the catalogued traits, astrait name → type names. - public_
type_ 🔒name - The name of a
pubstruct, enum or type alias. - render_
section 🔒 - Writes one catalogue.
- scope_
of 🔒 - The directory a re-export’s path names, so a name can be resolved without guessing between two same-named types.
- summary_
for 🔒 - The rustdoc summary of one entry, resolved against the module it comes from.
- walk_
use_ 🔒tree - Walks a
usetree, accumulating the module path as it descends.