sphinxcontrib_rust.items
This module provides an enum for the various object types for the Rust domain.
The enum makes it easier to manage all the different object types. The module also
provides a data class RustObj that encapsulates the details of each object.
Classes
|
A dataclass for holding the details of a Sphinx object for Rust domain |
|
The various Rust items that are supported by the directives |
|
Various index types implemented by Sphinx |
- class sphinxcontrib_rust.items.RustItem(name: str, dispname: str, type_: RustItemType, docname: str, qualifier: str = '', anchor: str = '', priority: int = 0, entry_type: SphinxIndexEntryType = SphinxIndexEntryType.NORMAL)
A dataclass for holding the details of a Sphinx object for Rust domain
- Attributes:
- name:
The name of the object.
- dispname:
The name of the object used in directives and references.
- type_:
The object type.
- docname:
The document the object is defined in. This is the generated reStructured Text document, not the source code.
- qualifier:
Qualifier for the description.
- anchor:
Anchor for the entry within the docname.
- priority:
The search priority for the object.
- entry_type:
The Sphinx index entry type for the object.
- class sphinxcontrib_rust.items.RustItemType(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)
The various Rust items that are supported by the directives
- property display_name: str
Return the string to display for the item type.
Returns
fnfor theFUNCTIONitem type and the value for all other item types.
- classmethod from_str(value: str) RustItemType
Get the enum corresponding to the string value
- get_roles() Sequence[str]
Get the Sphinx roles that can reference the object type
- get_sphinx_obj_type() ObjType
Get the Sphinx
ObjTypeinstance for the object type
- static iter_roles() Iterator[tuple[str, str]]
Iterate over (type, role) tuples across all types
- class sphinxcontrib_rust.items.SphinxIndexEntryType(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Various index types implemented by Sphinx