File: formatters.rs

package info (click to toggle)
rust-colored 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 184 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

use color::Color;
use style::Style;

pub trait ColoringFormatter {
    fn format(out: String, fg: Color, bg: Color, style: Style) -> String;
}

pub struct NoColor;

impl ColoringFormatter for NoColor {
    fn format(out: String, _fg: Color, _bg: Color, _style: Style) -> String {
        out
    }
}