Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Package sdml-tera
Rust integration between the SDML core model and the Tera template engine.
This package is part of the Rust SDML project and specifically implements an integration between the SDML core model and the Tera template engine to allow template-based generation from one or more SDML modules. The project's intent is to provide an idiomatic implementation of the in-memory model, parser, generators, and the CLI tool.
It is planned for a more complete version of the CLI functionality to be integrated into the overall SDML CLI at some point.
The following figure demonstrates this package in the broader project context.
╭───────╮
│ CLI │
╔══ │ crate │ ══╗
║ ╰───────╯ ║
┌╌╌╌╌╌╌╌╌┐ V V
┆ ┆ ╭───────╮ ╭──────────╮ Formatted Source
┆ source ┆ ══> │ parse │ ══> │ generate │ ══> RDF Representation
┆ file ┆ ╭───│ crate │───────│ crate │───╮ Documentation
┆ ┆ │ ╰───────╯ ╰──────────╯ │ Diagrams
└╌╌╌╌╌╌╌╌┘ │ core/errors crate │
╰──────────────────────────────────╯
┌───────┐ ⋀
│ other │ ║
│ tools │ ════════════════╝
└───────┘
Example
We wish to produce an output such as the following, a bulleted outline of a module.
* * * * * * * * * * * * * * * * * * * * * *
To do this we create a file named outline.md with the following content.
{% macro member(item) %}
{%- if item.__type == "reference" -%}
*{{ item.type_ref }}*
{% elif item.__type == "definition" -%}
{{ item.name }} -> *{{ item.type_ref }}*
{% endif -%}
{% endmacro member %}
* * *
Once we have finished testing using the sdml-tera tool we can write the
following code to render any module with the template above.
use Module;
use ModuleStore;
use make_engine_from;
use render_module;
Changes
Version 0.1.0
Initial release.