Skip to main content

synthesise_generic_doc_block

Function synthesise_generic_doc_block 

Source
fn synthesise_generic_doc_block(
    kind: &str,
    generic: &str,
    classes: &[String],
    export: bool,
    dispatch: &str,
    no_dots: bool,
) -> String
Expand description

Synthesise a standalone roxygen doc block for a generic.

Produces a block with:

  • @title / @description describing the generic
  • @param lines for each dispatch argument (plus ... unless no_dots)
  • @name <generic> — yields the bare \alias{<generic>} that ?generic resolves
  • @export or @rawNamespace export(<generic>) as appropriate
  • NULL anchor

The method blocks emitted by the class generators keep their qualified @name Class-generic so there is no duplicate-alias regression.