1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#[derive(Debug, Clone, Copy)]
pub enum ColumnWidthDistribution {
Total {
width: usize,
},
Components {
tree_column_max_width: usize,
bar_column_width: usize,
},
}
pub use ColumnWidthDistribution::*;
impl ColumnWidthDistribution {
#[inline]
pub const fn total(width: usize) -> Self {
Total { width }
}
#[inline]
pub const fn components(tree_column_max_width: usize, bar_column_width: usize) -> Self {
Components {
tree_column_max_width,
bar_column_width,
}
}
pub(super) fn set_components(&mut self, tree_column_max_width: usize, bar_column_width: usize) {
*self = Self::components(tree_column_max_width, bar_column_width);
}
}