parallel_disk_usage/visualizer/bar_alignment.rs
1/// The alignment of the bars.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub enum BarAlignment {
4 /// Fill the bars from left to right.
5 Left,
6 /// Fill the bars from right to left.
7 Right,
8}
9
10impl BarAlignment {
11 #[cfg(feature = "cli")]
12 pub(crate) const fn from_align_right(align_right: bool) -> Self {
13 if align_right {
14 BarAlignment::Right
15 } else {
16 BarAlignment::Left
17 }
18 }
19}