Skip to main content

docs_only_class_block

Function docs_only_class_block 

Source
pub(crate) fn docs_only_class_block(
    parsed_impl: &ParsedImpl,
    kind: &str,
) -> Vec<String>
Expand description

The roxygen block of an S3 or vctrs class without a constructor that the package names and builds itself (class = "...", #1918), documenting no object: it carries the impl docs.

  • On the impl’s @rdname topic, a page the package documents itself, it adds no alias and no title, and sorts after the topic’s own blocks (crate::roxygen::ORDER_AFTER_TOPIC_BLOCKS), so their name wins.
  • Otherwise its page is named for the class, aliased by it, and titled by default (kind, the class system in the title) unless the impl docs give a @title.

Ends with NULL, before which ClassWrapper::mark_class_doc_lines goes; the writer drops the block when there is nothing to say (CLASS_DOCS_ONLY_MARKER).