Expand description
Language-native documentation comment emission. Provides standardized functions for emitting doc comments in different languages.
Structs§
- Rustdoc
Sections - A parsed rustdoc comment broken out into the sections binding emitters care about.
Functions§
- doc_
first_ paragraph_ joined - Return the first paragraph of a doc comment as a single joined line.
- emit_
csharp_ doc - Emit C# XML documentation comments (///
… ) Used for C# classes, structs, methods, and properties. - emit_
dartdoc - Emit Dartdoc-style documentation comments (///) Used for Dart classes, methods, and properties.
- emit_
elixir_ doc - Emit Elixir documentation comments (@doc) Used for Elixir modules and functions.
- emit_
gleam_ doc - Emit Gleam documentation comments (///) Used for Gleam functions and types.
- emit_
javadoc - Emit Javadoc-style documentation comments (/** … */) Used for Java classes, methods, and fields. Handles XML escaping and Javadoc tag formatting.
- emit_
kdoc - Emit KDoc-style documentation comments (/** … */) Used for Kotlin classes, methods, and properties.
- emit_
phpdoc - Emit PHPDoc-style comments (/** … */) Used for PHP classes, methods, and properties.
- emit_
roxygen - Emit R roxygen2-style documentation comments (#’) Used for R functions.
- emit_
rustdoc - Emit Rust
///documentation comments. - emit_
swift_ doc - Emit Swift-style documentation comments (///) Used for Swift structs, enums, and functions.
- emit_
zig_ doc - Emit Zig documentation comments (///) Used for Zig functions, types, and declarations.
- parse_
arguments_ bullets - Parse
# Argumentsbody into(name, description)pairs. - parse_
rustdoc_ sections - Parse a rustdoc string into
RustdocSections. - render_
csharp_ xml_ sections - Render
RustdocSectionsas a C# XML doc comment body (without the///line prefixes — the emitter adds those). - render_
doxygen_ sections - Render
RustdocSectionsas a Doxygen comment body for the C header. - render_
javadoc_ sections - Render
RustdocSectionsas a JavaDoc comment body. - render_
jsdoc_ sections - Render
RustdocSectionsas a JSDoc comment body (without the/**/*/wrappers — those are added by the caller’s emitter, which knows the indent/escape conventions). - render_
phpdoc_ sections - Render
RustdocSectionsas a PHPDoc comment body. - replace_
fence_ lang - Strip a single
```langfence pair frombody, returning the inner code lines. Replaces the leading```rust(or any other tag) withlang_replacement, leaving the rest of the body unchanged.