The example in the crate docs looks like it can parse a liquid template and accepts arbitrary data to use while rendering.
let template = liquid::ParserBuilder::with_stdlib()
.build().unwrap()
.parse("Liquid! {{num | minus: 2}}").unwrap();
let mut globals = liquid::object!({
"num": 4f64
});
let output = template.render(&globals).unwrap();
assert_eq!(output, "Liquid! 2".to_string());
In that example, the "Liquid! {{num | minus: 2}}" is the template string. It doesn't really matter where you got the template string from, so you could just as easily pass in a reference to the string you get from std::fs::read_to_string().
The template.render(&globals) bit lets you render a template to a String, using globals as the rendering context.