[][src]Function germinate::process

pub async fn process<T: AsRef<str>>(input: T) -> Result<String>

This is the main entrypoint to the library. It takes a String which contains template strings and individually loads and replaces the template strings with the value they represent

Examples

#[tokio::main]
async fn main() {
    std::env::set_var("ORC_NAME", "Nigel");
    let input = String::from("Rest in peace, %env:ORC_NAME%.");
    let output = germinate::process(&input).await.unwrap();
    assert_eq!("Rest in peace, Nigel.", output);
}