pub type DoctreeLoader<'a> = dyn Fn(&str) -> Option<Cow<'a, Doctree>> + 'a;Expand description
How the numbering passes reach a document’s doctree.
Sphinx calls env.get_doctree(docname), which unpickles
doctreedir/<docname>.doctree on every call. This crate already holds
most doctrees in memory (the read phase’s results, including the ones a
warm cache hit loaded from disk), so the loader hands back a Cow:
borrowed for a doctree the caller already has, owned for one it had to
read. Returning None — Sphinx would raise — simply skips the document.