pub fn documentation_model_merged<'a>(
primary: (&'a Path, &'a str),
files: impl IntoIterator<Item = (&'a Path, &'a str)>,
) -> Option<DocModel>Expand description
#1885: the documentation model for the unit that primary declares,
merged across every file in files that declares the same unit.
files is (path, text) for the candidate files — typically the unit’s
files from the project’s unit→sources map; any that declare another unit,
a different kind, or a suite are skipped, and primary need not be among
them (it is always included). The page title and unit_span come from
primary, the file the page was asked for. The lede is the unit’s module
doc from whichever file carries it (at most one does; should a broken
project have more, the first in path order wins). Entries are every file’s
declarations, files in path order and each file’s in source order, each
tagged with its DocEntry::file. The result is the same page whichever
of the unit’s files is primary, apart from the title’s span.