welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
welder::rods::python::sphinx_style Struct Reference

Sphinx-style docstring assembly (reStructuredText field lists). More...

#include <welder/rods/python/doc_style.hpp>

Static Public Member Functions

static constexpr std::string format (const ::welder::detail::function_doc &d)
 Assemble d into a Sphinx (reStructuredText) docstring.

Detailed Description

Sphinx-style docstring assembly (reStructuredText field lists).

The summary, then a :param name: text field for each documented parameter, then a :returns: text field — the reST field-list form sphinx.ext.autodoc reads without any Napoleon translation. The field block is separated from the summary by a blank line; continuation lines of a multiline doc are indented four spaces so they stay part of the field body. Undocumented parameters are omitted; with no docs at all the result is empty.

Satisfies welder::doc_style.

Definition at line 190 of file doc_style.hpp.

Member Function Documentation

◆ format()

constexpr std::string welder::rods::python::sphinx_style::format ( const ::welder::detail::function_doc & d)
inlinestaticconstexpr

Assemble d into a Sphinx (reStructuredText) docstring.

Parameters
dthe documentation pieces.
Returns
the formatted docstring (possibly empty).

Definition at line 194 of file doc_style.hpp.

References welder::rods::python::detail::any_param_doc(), welder::rods::python::detail::append_indented(), and welder::rods::python::detail::blank_line().


The documentation for this struct was generated from the following file: