Debian Codegraph @

src/options/config/style/memory.rs

raw symbols SCIP
1 use serde::{Deserialize, Serialize};
2
3 use super::ColourStr;
4
5 /// Styling specific to the memory widget.
6 #[derive(Clone, Debug, Default, Deserialize, Serialize)]
7 #[cfg_attr(feature = "generate_schema", derive(schemars::JsonSchema))]
8 #[cfg_attr(test, serde(deny_unknown_fields), derive(PartialEq, Eq))]
9 pub(crate) struct MemoryStyle {
10 /// The colour of the RAM label and graph line.
11 #[serde(alias = "ram_color")]
12 pub(crate) ram_colour: Option<ColourStr>,
13
14 /// The colour of the cache label and graph line. Does not do anything on
15 /// Windows.
16 #[cfg_attr(target_os = "windows", allow(dead_code))]
17 #[serde(alias = "cache_color")]
18 pub(crate) cache_colour: Option<ColourStr>,
19
20 /// The colour of the swap label and graph line.
21 #[serde(alias = "swap_color")]
22 pub(crate) swap_colour: Option<ColourStr>,
23
24 /// The colour of the ARC label and graph line.
25 #[serde(alias = "arc_color")]
26 pub(crate) arc_colour: Option<ColourStr>,
27
28 /// Colour of each GPU's memory label and graph line. Read in order.
29 #[serde(alias = "gpu_colors")]
30 pub(crate) gpu_colours: Option<Vec<ColourStr>>,
31 }