Module

PuduLangDocgen.Api.Catalog

View source

Selected declarations, their pages, identities, and navigation

Types

Name Description
Rule An include or exclude decision for identities a pattern matches
Options Where reference pages go and which declarations they show

Functions

Name Description
defaults Options that show exported declarations under `api` with default layouts.
rules Rules of a filter file: `apiRules` listing `include` or `exclude` entries, each with a `uidRegex` and an optional `type` of `Module`, `Type`, `Function`, `Constant`, or `Member`.
select Declarations kept for publication: exported ones unless private ones are asked for, whose identity matches an include pattern when any is given and no exclude pattern.
pageOf The published path of a module or type page.
references Identities of every module, declaration, field, variant, and method with its destination. Modules and types have pages; functions and constants are sections of their module page, and fields, variants, and methods sections of their type page.
toc Navigation of modules, each listing its types and traits, and its functions and constants when they have pages of their own. Items carry the identity they link to. Nested navigation groups modules under the modules their names extend.
sourceLink A browser link to a declaration's source line, or the empty text without a pattern. The pattern names `\{path\}` and `\{line\}`.
lastName The last dotted segment of an identity.

defaults

fn defaults() -> Options

Options that show exported declarations under api with default layouts.

Returns

Options

View source

rules

fn rules(value: &Docgen.Meta) -> Result[Array[Rule], Str]

Rules of a filter file: apiRules listing include or exclude entries, each with a uidRegex and an optional type of Module, Type, Function, Constant, or Member.

Parameters

value
&Docgen.Meta

Returns

Result[Array[Rule], Str]

View source

select

fn select(units: &Array[Model.Unit], options: &Options) -> Array[Model.Unit]

Declarations kept for publication: exported ones unless private ones are asked for, whose identity matches an include pattern when any is given and no exclude pattern.

Parameters

units
&Array[Model.Unit]
options
&Options

Returns

Array[Model.Unit]

View source

pageOf

fn pageOf(options: &Options, uid: Str) -> Str

The published path of a module or type page.

Parameters

options
&Options
uid
Str

Returns

Str

View source

references

fn references(units: &Array[Model.Unit], options: &Options) -> Array[Docgen.Reference]

Identities of every module, declaration, field, variant, and method with its destination. Modules and types have pages; functions and constants are sections of their module page, and fields, variants, and methods sections of their type page.

Parameters

units
&Array[Model.Unit]
options
&Options

Returns

Array[Docgen.Reference]

View source

toc

fn toc(units: &Array[Model.Unit], options: &Options) -> Array[Docgen.TocItem]

Navigation of modules, each listing its types and traits, and its functions and constants when they have pages of their own. Items carry the identity they link to. Nested navigation groups modules under the modules their names extend.

Parameters

units
&Array[Model.Unit]
options
&Options

Returns

Array[Docgen.TocItem]

View source

fn sourceLink(options: &Options, path: Str, line: Int) -> Str

A browser link to a declaration's source line, or the empty text without a pattern. The pattern names \{path\} and \{line\}.

Parameters

options
&Options
path
Str
line
Int

Returns

Str

View source

lastName

fn lastName(uid: Str) -> Str

The last dotted segment of an identity.

Parameters

uid
Str

Returns

Str

View source