Debian Codegraph @

src/options/config/network_graph.rs

raw symbols SCIP
1 use serde::Deserialize;
2
3 use super::IgnoreList;
4
5 /// Network configuration.
6 #[derive(Clone, Debug, Default, Deserialize)]
7 #[cfg_attr(feature = "generate_schema", derive(schemars::JsonSchema))]
8 #[cfg_attr(test, serde(deny_unknown_fields), derive(PartialEq, Eq))]
9 pub(crate) struct NetworkGraphConfig {
10 /// A filter over the network interface names.
11 pub(crate) interface_filter: Option<IgnoreList>,
12
13 /// Displays packet rate and average packet size info.
14 pub(crate) show_packets: Option<bool>,
15
16 // TODO: We probably want to make this an enum...? If we want to also support external legends
17 // (e.g. table-style, list-style) then we probably need a new system outright.
18 /// Where to place the legend for the network chart widget.
19 pub(crate) legend_position: Option<String>,
20
21 /// Displays the network widget using bytes. Defaults to bits.
22 pub(crate) use_bytes: Option<bool>,
23
24 /// Displays the network widget with a log scale. Defaults to a non-log scale.
25 pub(crate) use_log: Option<bool>,
26
27 /// Displays the network widget with a binary prefix (e.g. kibibits) rather than a decimal
28 /// prefix (e.g. kilobits). Defaults to decimal prefixes.
29 pub(crate) use_binary_prefix: Option<bool>,
30
31 /// Zeroes out the total network usage ("All") counters so it shows the total usage
32 /// since the app is started, rather than the total usage since boot.
33 pub(crate) start_zeroed: Option<bool>,
34 }