Expand description
Copperlace text renderer.
Copperlace compiles configuration into named rules and renders one rule at a
time. Templates can reference other rules, make random choices, bind values
for the duration of one render, use lazy context defaults, and transform
rendered text with processors.
Rust callers can also provide initial render context values when rendering a
rule.
For repeated renders from the same config, use Copperlace or RuleSet
so the config is parsed and compiled once. For one-off rendering, use
render_file or render_str.
Re-exports§
pub use config::ConfigError;pub use config::Copperlace;pub use config::render_file;pub use config::render_file_inferred;pub use config::render_file_inferred_with_context;pub use config::render_file_structured;pub use config::render_file_structured_with_context;pub use config::render_file_with_context;pub use config::render_str;pub use config::render_str_inferred;pub use config::render_str_inferred_with_context;pub use config::render_str_structured;pub use config::render_str_structured_with_context;pub use config::render_str_with_context;pub use config::ruleset_from_file;pub use config::ruleset_from_str;pub use render::CopperlaceNumber;pub use render::CopperlaceValue;pub use render::Processor;pub use render::ProcessorRegistry;pub use render::RenderContext;pub use render::RenderError;pub use render::RuleSet;pub use render::StructuredNode;pub use render::TextGeneratorNode;pub use render::processor;pub use render::render_config_rule;pub use render::render_config_rule_structured;pub use render::render_config_rule_structured_with_context;pub use render::render_config_rule_with_context;