Rocal UI - A simple template engine with Rust

Although this template engine is basically intended to use with Rocal framework to craft views, it can be used anywhere with Rust.
Let's begin with syntax of Rocal UI. Here is a simple example including variables, if-else control, and for-loop control.
view!
It's straight forward, isn't it?
{ variable }: You can set a variable that returns&strand it will be sanitized HTML safe.{{ variable }}: You can set a variable that returns&strbut it will NOT sanitized HTML safe. So maybe you could use it to embed a safe HTML.if-else: you can utilizeif-elseevenelse-ifas below
if user.id <= 10 else if user.id <= 20 else
for-in: This can be used as same as Rust syntax
for article in articles
Advanced use
view! {} produces HTML string technically, so you can embed view! in another view! like using it as a partial template.
let button = view! ;
view!
On top of that, so {{ variable }} can take any expression that emits &str of Rust, if you want to do string interpolation, you can write like {{ &format!("Hi, {}", name) }}.
How to install
// Cargo.toml
= { = [LATEST_VERSION], = false, = ["ui"] }
OR
(if you have not had cargo yet, follow this link first)
Then in yourapp/src/templates/root_template.rs, you could see an example of usage of Rocal UI