Skip to main content

Module docs

Module docs 

Source
Expand description

In-process documentation system for the rl docs CLI command.

Stores all language reference material as static data compiled into the binary - no external files needed at runtime. Organized into three categories:

  • stdlib - StdEntry / FnEntry for every stdlib module and function
  • concepts - ConceptEntry for language features (types, loops, imports, etc.)
  • tutorials - ConceptEntry steps for the beginner and advanced tutorials

The std_to_markdown, concept_to_markdown, and tutorial_to_markdown functions render these entries into Markdown for display in the terminal.

Modulesยง

entries
Aggregates all documentation entries and exposes them as flat Vecs for the renderer functions in crate::docs.
entry
Static data types used to represent all documentation entries.

Structsยง

DocsJson

Functionsยง

concept_to_markdown
Renders concept entries into a Markdown language reference document.
docs_to_json
entries_to_markdown ๐Ÿ”’
shared renderer for any list of ConceptEntry under a custom header
find_fn_doc
Searches all stdlib entries for a function whose signature starts with fn_name(.
render_description ๐Ÿ”’
Renders one DescriptionEntry (title, kind label, prose, examples, and expected output) into the given output buffer.
render_related ๐Ÿ”’
Renders a see_also/related/related_stdlib list as a Markdown line, or an empty string if the list is empty.
std_to_markdown
Renders all stdlib entries into a Markdown reference document.
tutorial_to_markdown
Renders tutorial entries into a Markdown step-by-step tutorial document.