paige 0.1.0

A simple HTML templating API, written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

pub struct Formatter {
   pub buf: String,
}

impl Formatter {
   pub fn write<N: Into<String>>(&mut self, text: N) {
      self.buf = format!("{}{}", self.buf, text.into());
   }
   
   pub fn prepend_depth(&mut self, depth: usize) {
      for _ in 0..depth {
         self.write("   ");
      }
   }
}