sphinxcontrib_rust
Init module for the extension with the setup function used by Sphinx
Functions
|
Generate the Rust docs once the builder is ready. |
|
Set up the extension |
Classes
|
Dataclass for the crate configuration. |
- class sphinxcontrib_rust.CrateConfiguration(crate_name: str, crate_dir: str, doc_dir: str, format: str = 'rst', visibility: str = 'pub', force: bool = False, strip_src: bool = True)
Dataclass for the crate configuration.
This is the Python equivalent of
sphinx_rustdocgen::Configuration. It is serialized as JSON and shared with the Rust executable.- classmethod from_sphinx_config(sphinx_config: Config) tuple[str, dict[str, CrateConfiguration]]
Extract the configuration for the crates from the Sphinx configuration.
The function mainly checks whether a given configuration option is global or per crate and creates the appropriate configuration for each crate. If all options are global, all crates will have the same configuration other than their
crate_dirfield.- Args:
- config:
The Sphinx configuration.
- Returns:
A tuple of the path of the executable for generating the docs and a dict of crate name to crate configuration mapping.
- sphinxcontrib_rust.generate_docs(app: Sphinx)
Generate the Rust docs once the builder is ready.
- Args:
- app:
The Sphinx application.
- config:
The parsed configuration.
- sphinxcontrib_rust.setup(app: Sphinx) Mapping[str, Any]
Set up the extension
Modules
Module for all the directive classes of the Rust domain |
|
Module for the |
|
Module for code related to generating the index of Rust items |
|
Module for Rust items and related utility classes |
|
Module for creating docutils nodes from the JSON in the layout option of the directives |
|
Module for enabling intra-doc links similar to Rustdoc |