sphinxcontrib_rust
Init module for the extension with the setup function used by Sphinx
Functions
|
Generate the Rust docs once the configuration has been read |
|
Set up the extension |
Classes
|
Dataclass for the crate configuration. |
- class sphinxcontrib_rust.CrateConfiguration(crate_name: str, src_dir: str, doc_dir: str, format: str = 'rst', visibility: str = 'pub', force: bool = False)
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
src_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, config: Config)
Generate the Rust docs once the configuration has been read
- 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 |