#indent #write #indentation #wrapper #adapters

indent_write

Simple Write adapters to add line indentation

4 stable releases

2.2.0 Apr 21, 2021
2.1.0 Feb 7, 2021
2.0.0 Dec 7, 2020
1.0.0 Dec 7, 2020

#531 in Text processing

Download history 25837/week @ 2022-12-08 24600/week @ 2022-12-15 13183/week @ 2022-12-22 15343/week @ 2022-12-29 24597/week @ 2023-01-05 27963/week @ 2023-01-12 35750/week @ 2023-01-19 39461/week @ 2023-01-26 30724/week @ 2023-02-02 30058/week @ 2023-02-09 28387/week @ 2023-02-16 30089/week @ 2023-02-23 26670/week @ 2023-03-02 25974/week @ 2023-03-09 25323/week @ 2023-03-16 28563/week @ 2023-03-23

111,633 downloads per month
Used in 86 crates (4 directly)

MPL-2.0 license

17KB
225 lines

indent-write

Nestable wrappers for fmt::Write and io::Write that perform indentation for you


lib.rs:

Simple indentation adapters for [io::Write][std::io::Write], [fmt::Write][std::fmt::Write], and [Display][std::fmt::Display]. Each adapter wraps a writer or writable object, and inserts an indentation at the front of each non-empty line.

See [fmt::IndentWriter], [io::IndentWriter], and [indentable::Indentable] for examples.

No runtime deps

Features

  • std