pyo3_macros_backend::utils

Function get_doc

Source
pub fn get_doc(
    attrs: &[Attribute],
    text_signature: Option<String>,
    ctx: &Ctx,
) -> PythonDoc
Expand description

Collects all #[doc = “…”] attributes into a TokenStream evaluating to a null-terminated string.

If this doc is for a callable, the provided text_signature can be passed to prepend this to the documentation suitable for Python to extract this into the __text_signature__ attribute.

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here