Module impls

Module impls 

Source
Expand description

Implementation block rendering for documentation generation.

This module provides the ImplRenderer struct which handles rendering impl blocks (both inherent and trait implementations) to markdown format.

§Path Types in rustdoc_types::Impl

When working with impl blocks, there are two different path representations:

  • Impl.trait_: Option<Path> - The trait being implemented

    • Path.path is a String like "Clone" or "std::fmt::Debug"
    • Use for display/rendering in documentation output
    • Extract trait name with path.rsplit("::").next()
  • ItemSummary.path: Vec<String> - Structured path from krate.paths

    • Example: ["std", "clone", "Clone"]
    • Use for lookups and resolution via item IDs

The Path.path string is already formatted for display, while ItemSummary.path is structured for programmatic manipulation.

Structs§

ImplRenderer
Renders impl blocks to markdown.
ImplUtils
Utility functions to work with impl’s and generics

Constants§

TRIVIAL_DERIVE_DESCRIPTIONS
Short descriptions for trivial derive traits, used in summary tables.
TRIVIAL_DERIVE_TRAITS
Trivial derive trait implementations that can be collapsed.