formatdoc!() { /* proc-macro */ }
Expand description
Unindent and call format!
.
Argument syntax is the same as for std::format!
.
ยงExample
let request = formatdoc! {"
GET {url}
Accept: {mime}
",
url = "http://localhost:8080",
mime = "application/json",
};
println!("{}", request);
GET http://localhost:8080
Accept: application/json