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 implementedPath.pathis aStringlike"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 fromkrate.paths- Example:
["std", "clone", "Clone"] - Use for lookups and resolution via item IDs
- Example:
The Path.path string is already formatted for display, while
ItemSummary.path is structured for programmatic manipulation.
Structs§
- Impl
Renderer - Renders impl blocks to markdown.
- Impl
Utils - 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.