sphinxcontrib-rust

Detailed docs

  • Including the docs in the Sphinx build
  • Rust specific roles
  • Rust specific directives
  • Rust items index
  • Limitations
  • Compatibility with rustdoc
  • Developer Documentation
  • sphinx-rustdocgen documentation
  • sphinxcontrib_rust documentation
    • Python package documentation
      • sphinxcontrib_rust
        • CrateConfiguration
        • generate_docs()
        • setup()
        • sphinxcontrib_rust.directives
        • sphinxcontrib_rust.domain
        • sphinxcontrib_rust.index
        • sphinxcontrib_rust.items
        • sphinxcontrib_rust.nodes
        • sphinxcontrib_rust.rust_link
          • link()
  • Release Notes
  • Contributing to sphinxcontrib-rust
sphinxcontrib-rust
  • sphinxcontrib_rust documentation
  • sphinxcontrib_rust
  • sphinxcontrib_rust.rust_link
  • View page source

sphinxcontrib_rust.rust_link

Module for enabling intra-doc links similar to Rustdoc

Functions

link(state, silent)

This is a monkey patch used to replace the markdown_it.rules_inline.link.link().

sphinxcontrib_rust.rust_link.link(state: StateInline, silent: bool) → bool

This is a monkey patch used to replace the markdown_it.rules_inline.link.link().

The main difference here is that it will mark any text with brackets as a link, even if there is no reference for it. This allows us to inject links for Rust items in the docs similar to rustdoc. However, it will also make links out of text that is not a Rust item name.

Returns:

True, if it found a link, otherwise False.

Previous Next

© Copyright 2026, Munir Contractor.

Built with Sphinx using a theme provided by Read the Docs.