Expand description
anstyle_git::parse
parses a color configuration string (in Git syntax)
into an anstyle::Style
:
§Examples
let style = anstyle_git::parse("bold red blue").unwrap();
assert_eq!(style, anstyle::AnsiColor::Red.on(anstyle::AnsiColor::Blue) | anstyle::Effects::BOLD);
let hyperlink_style = anstyle_git::parse("#0000ee ul").unwrap();
assert_eq!(hyperlink_style, anstyle::RgbColor(0x00, 0x00, 0xee).on_default() | anstyle::Effects::UNDERLINE);
Enums§
- Error
- Type for errors returned by the parser.
Functions§
- parse
- Parse a string in Git’s color configuration syntax into an
anstyle::Style
.