Skip to content

Commit

Permalink
Implementation of json flag, wich allows to print out a json represen…
Browse files Browse the repository at this point in the history
…tation of onefetch output
  • Loading branch information
HallerPatrick committed Dec 7, 2020
1 parent b48efa3 commit 65c7a54
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/onefetch/serializer.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use {colored::Color, serde::Serialize};

#[derive(Serialize)]
#[serde(remote = "Color")]
pub enum ColorDef {
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White,
BrightBlack,
BrightRed,
BrightGreen,
BrightYellow,
BrightBlue,
BrightMagenta,
BrightCyan,
BrightWhite,
TrueColor { r: u8, g: u8, b: u8 },
}

0 comments on commit 65c7a54

Please sign in to comment.