Expand description
Render Cooklang recipes into text formats.
Each module turns a parsed cooklang::Recipe into one target format.
The print_* functions write into a std::io::Write; the *_to_string
wrappers are for callers that want a String.
§Errors
These functions return a bare std::io::Error. The only thing that can
fail is the caller’s own writer: the recipe is already parsed, and every
field is optional, so there is nothing left to reject.
Re-exports§
pub use cooklang;
Modules§
- cooklang_
source - Format a recipe as cooklang
- human
- Format a recipe for humans to read
- latex
- Format a recipe as a standalone LaTeX document.
- markdown
- Format a recipe as markdown
- number
- Human-friendly rendering of quantity numbers.
- quantity
- Deterministic ordering for
GroupedQuantity. - schema
- Format a recipe as schema.org/Recipe JSON-LD.
- typst
- Format a recipe as a standalone Typst document.
Enums§
- Paper
Size - Page size for the
latexandtypstformatters. - Style
- Whether formatters emit ANSI escape codes.
Constants§
- REFERENCE_
SEPARATOR - The separator a recipe reference’s path is built and reported with.
Functions§
- human_
to_ string - Render a recipe the way
cook recipeprints it, into aString. - markdown_
to_ string - Render a recipe as Markdown, into a
String.