Skip to main content

Crate docgen_components

Crate docgen_components 

Source
Expand description

Custom-component directive registry. A Component is a directory <name>/{template.html, island.js?, style.css?}. Built-ins ship embedded in docgen-assets and load through the SAME Component::from_parts path that reads project components — so built-ins dogfood the mechanism. A project component overrides a built-in of the same name.

Structs§

Component
One loaded component.
DirectiveContext
The render inputs for a single directive instance.
Registry
A name → component map. Built-ins inserted first, project components last (so a project <name> overrides a built-in <name>).

Enums§

ComponentError

Functions§

build_registry
Build the full registry: embedded built-ins first, then project components from project_dir (which override built-ins by name).
discover
Read every <name>/ subdir of dir into components. template.html is required; a subdir without it is skipped (with no error — a stray dir is not fatal). Missing dir → no components (empty). Deterministic (sorted names).