Skip to content

Commit 65c7a54

Browse files
committed
Implementation of json flag, wich allows to print out a json representation of onefetch output
1 parent b48efa3 commit 65c7a54

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: src/onefetch/serializer.rs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
use {colored::Color, serde::Serialize};
2+
3+
#[derive(Serialize)]
4+
#[serde(remote = "Color")]
5+
pub enum ColorDef {
6+
Black,
7+
Red,
8+
Green,
9+
Yellow,
10+
Blue,
11+
Magenta,
12+
Cyan,
13+
White,
14+
BrightBlack,
15+
BrightRed,
16+
BrightGreen,
17+
BrightYellow,
18+
BrightBlue,
19+
BrightMagenta,
20+
BrightCyan,
21+
BrightWhite,
22+
TrueColor { r: u8, g: u8, b: u8 },
23+
}

0 commit comments

Comments
 (0)