annotate_snippets/renderer/
stylesheet.rs1use anstyle::Style;
2
3#[derive(Clone, Copy, Debug)]
4pub(crate) struct Stylesheet {
5 pub(crate) error: Style,
6 pub(crate) warning: Style,
7 pub(crate) info: Style,
8 pub(crate) note: Style,
9 pub(crate) help: Style,
10 pub(crate) line_num: Style,
11 pub(crate) emphasis: Style,
12 pub(crate) none: Style,
13 pub(crate) context: Style,
14 pub(crate) addition: Style,
15 pub(crate) removal: Style,
16}
17
18impl Default for Stylesheet {
19 fn default() -> Self {
20 Self::plain()
21 }
22}
23
24impl Stylesheet {
25 pub(crate) const fn plain() -> Self {
26 Self {
27 error: Style::new(),
28 warning: Style::new(),
29 info: Style::new(),
30 note: Style::new(),
31 help: Style::new(),
32 line_num: Style::new(),
33 emphasis: Style::new(),
34 none: Style::new(),
35 context: Style::new(),
36 addition: Style::new(),
37 removal: Style::new(),
38 }
39 }
40}