Crate liquid [−] [src]
The Liquid templating language for Rust
[dependencies]
liquid = "0.13"
Example
let template = liquid::ParserBuilder::with_liquid() .build() .parse("Liquid! {{num | minus: 2}}").unwrap(); let mut globals = liquid::Object::new(); globals.insert("num".to_owned(), liquid::Value::Num(4f32)); let output = template.render(&globals).unwrap(); assert_eq!(output, "Liquid! 2".to_string());
Modules
compiler | |
interpreter |
Structs
Index | |
Parser | |
ParserBuilder | |
Template |
Enums
Error | |
Value |
An enum to represent different value types |
Type Definitions
Array |
Type representing a Liquid array, payload of the |
Object |
Type representing a Liquid object, payload of the |