Expand description
This crate is used to create engines based on Kismesis.
§Basic Use
First, we create the engine and register some files.
use kismesis::Kismesis;
let mut engine = Kismesis::new(); // Engine must be mutable
let mut my_parsed_file = engine.register_str("<p: this is a kismesis string!>").unwrap();
This will give us a ParsedFile
that we can then use during templating. Templates can only be used through a KisTemplateId
because they might have other templates and even be self referential. The engine provides register_template
to store the file and obtain the ID.
// This obtains a ParsedFile.
let my_template = engine.register_str("# Test\n<content!>").unwrap();
// This registers that file as a template, returning a KisTemplateId
let my_template = engine.register_template(my_template);
my_parsed_file.template = Some(my_template);
println!("{}", html::compile(&my_parsed_file, &engine).unwrap());
Modules§
- Data structures representing every possible failure during Kismesis’ runtime.
- Module containing everything that turns kismesis into html.
- Module regarding
Token
s and tokenization. - Kismesis configuration data structure
- Module containing all of kismesis’ parsing utilities.
Structs§
- The tokens and path (if any) of a file.
- ID newtype for kismesis tokens
- A struct which contains Kismesis data that might be self-referential, such as templates (which might be recursuve)
Enums§
- IDs for kismesis templates
Traits§
- Trait for things that implement Push to convert into that type before pushing