Skip to main content

documentation_model

Function documentation_model 

Source
pub fn documentation_model(text: &str) -> Option<DocModel>
Expand description

Build the documentation model for a single file’s text. Returns None when the file has no recognisable unit header, or is a test suite (suite units are not a documentation unit in Tier 1 — their case/stub members have no describe_* renderer, and a doc page for tests is out of scope).

Since #1885 the language server serves documentation_model_merged instead, so this has no production caller. It stays as the file-scoped core that needs no project: this module’s unit tests pin each declaration kind’s entry through it, and a host with a lone buffer (no project to merge across) can still build a page from one text.