pub struct SphinxIndexBuilder { /* private fields */ }Expand description
Sphinx’s IndexBuilder: fed one resolved document at a time by the
build’s resolve phase (Sphinx: write_doc_serialized → index_page →
feed), then frozen once into the searchindex.js value.
Feeding the resolved doctree is what makes cross-reference text match:
a :doc: or :ref: without an explicit title indexes the target’s
title, which is the text of the reference ReferencesResolver built.
Implementations§
Source§impl SphinxIndexBuilder
impl SphinxIndexBuilder
pub fn new() -> Self
Sourcepub fn feed(
&mut self,
docname: &str,
filename: &str,
title: &str,
doctree: &Doctree,
env: &BuildEnvironment,
)
pub fn feed( &mut self, docname: &str, filename: &str, title: &str, doctree: &Doctree, env: &BuildEnvironment, )
IndexBuilder.feed, behind the index_page gate: a document whose
metadata carries :nosearch: (or :no-search:) is fed an empty
title and an empty document, so it keeps its slot in docnames and
contributes nothing else.
Sourcepub fn freeze(&self, env: &BuildEnvironment) -> Value
pub fn freeze(&self, env: &BuildEnvironment) -> Value
IndexBuilder.freeze: the Search.setIndex payload.
Trait Implementations§
Source§impl Debug for SphinxIndexBuilder
impl Debug for SphinxIndexBuilder
Source§impl Default for SphinxIndexBuilder
impl Default for SphinxIndexBuilder
Source§fn default() -> SphinxIndexBuilder
fn default() -> SphinxIndexBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SphinxIndexBuilder
impl RefUnwindSafe for SphinxIndexBuilder
impl Send for SphinxIndexBuilder
impl Sync for SphinxIndexBuilder
impl Unpin for SphinxIndexBuilder
impl UnsafeUnpin for SphinxIndexBuilder
impl UnwindSafe for SphinxIndexBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more