Function mrml::parse

source ·
pub fn parse<T: AsRef<str>>(input: T) -> Result<Mjml, Error>
Expand description

Function to parse a raw mjml template using the default parsing options.

match mrml::parse("<mjml><mj-head /><mj-body /></mjml>") {
    Ok(_) => println!("Success!"),
    Err(err) => eprintln!("Something went wrong: {err:?}"),
}