2 releases

0.1.1 Nov 10, 2023
0.1.0 Nov 10, 2023

#34 in #composition

MIT/Apache

4KB
63 lines

HTML pipe

The goal of this crate is to make it easier to build html components on the server side and reuse them.

How to use

cargo add html-pipe
use html_pipe::*;

let mut buf = Buffer::new();
node("html", attr("lang", "en"), node("body", noop, text("Hello World!")))(&mut buf).unwrap();
assert_eq!(buf, "<html lang=\"en\"><body>Hello World</body></html>");

TODO

  • Add a function to chain function calls
  • Be able to stream the calls

No runtime deps