#display #traits #controlling #able #displayable #exhibit-ext

exhibit

A small Rust library for controlling the display of any Displayable type

2 unstable releases

0.2.0 Jul 24, 2022
0.1.0 Jul 23, 2022

#11 in #able

Custom license

26KB
552 lines

exhibit

exhibit is a small Rust library for controlling the display of any Displayable type.

The main functionality is provided by the ExhibitExt trait.

Example

use exhibit::ExhibitExt;

let text = "\x1b[31mHello, 🌎!\x1b[0m";

assert_eq!(
    text.exhibit().redact(true).into(),
    "\x1b[31m▆▅▆▆▅, ▇▇!\x1b[0m\n",
);

lib.rs:

exhibit is a small Rust library for controlling the display of any Displayable type.

The main functionality is provided by the ExhibitExt trait.

Example

use exhibit::ExhibitExt;

let text = "\x1b[31mHello, 🌎!\x1b[0m";

assert_eq!(
    text.exhibit().redact(true).to_string(),
    "\x1b[31m▆▅▆▆▅, ▇▇!\x1b[0m\n",
);

Dependencies

~0–11MB
~56K SLoC