#text #formatting #wrap #typesetting #macro

macro textwrap-macros-impl

Simple procedural macros to use textwrap utilities at compile time

5 releases

✓ Uses Rust 2018 edition

0.2.3 Jun 29, 2020
0.2.2 Apr 10, 2020
0.2.1 Jan 23, 2020
0.2.0 Jan 15, 2020
0.1.0 Jan 7, 2020

#7 in #wrap

Download history 10/week @ 2020-03-14 10/week @ 2020-03-21 6/week @ 2020-03-28 53/week @ 2020-04-04 62/week @ 2020-04-11 11/week @ 2020-04-18 5/week @ 2020-04-25 20/week @ 2020-05-02 6/week @ 2020-05-09 15/week @ 2020-05-16 10/week @ 2020-05-23 12/week @ 2020-05-30 49/week @ 2020-06-06 27/week @ 2020-06-13 3/week @ 2020-06-20 44/week @ 2020-06-27

92 downloads per month
Used in 3 crates (via textwrap-macros)

MIT license

8KB
102 lines

textwrap-macros Star me

Simple procedural macros to use textwrap utilities at compile time.

TravisCI Codecov License Source Crate Documentation Changelog

Usage

Add the textwrap-macros crate to the Cargo.toml manifest:

[dependencies]
textwrap-macros = "0.2"

Then either use the macros using the old-style #[macro_use] or import them as any other crate member:

use textwrap_macros::dedent;

const poem: &str = dedent!(r#"
      When we two parted
      In silence and tears,
      Half broken-hearted
      To sever for years,
      Pale grew thy cheek and cold,
      Colder thy kiss;
      Truly that hour foretold
      Sorrow to this.
"#);

Macros usage with small examples can be found on docs.rs. The following functions have been ported into macros:

Check out the documentation of the original library for more information about the behaviour of each of the wrapped functions.

Changelog

This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.

Dependencies

~0.5–0.8MB
~18K SLoC