Skip to main content

Module catalog

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:

  1. every implementor of Sampler, Scheduler or Storage that atune_core re-exports, or that the facade itself defines, appears in the matching facade module — the check that would have caught FreezeThaw;
  2. every name the crate root re-exports from an atune_core module also appears in that facade module, so the flat list can never again name something the module list does not;
  3. 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 use into its leaf names, keeping the path and the gate.
declarations 🔒
Every public type declaration in the two crates, by name.
facade_modules 🔒
Every pub mod of the facade’s lib.rs, with its re-export list.
feature_cell 🔒
How a table cell says which feature gates an entry.
implementors 🔒
Every pub type in the two crates that implements one of the catalogued traits, as trait name → type names.
public_type_name 🔒
The name of a pub struct, 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 use tree, accumulating the module path as it descends.