[go: up one dir, main page]

Function indented

Source
pub fn indented<D: ?Sized>(f: &mut D) -> Indented<'_, D>
Expand description

Helper function for creating a default indenter

Examples found in repository?
examples/usage.rs (line 8)
4fn main() {
5    let input = "verify\nthis";
6    let mut output = String::new();
7
8    indented(&mut output).ind(12).write_str(input).unwrap();
9
10    println!("Before:\n{}\n", input);
11    println!("After:\n{}", output);
12}