parallel_disk_usage/visualizer/
direction.rs

1/// The direction of the visualization of the tree.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub enum Direction {
4    /// The root of the tree is placed at the bottom of the visualization.
5    BottomUp,
6    /// The root of the tree is placed at the top of the visualization.
7    TopDown,
8}
9
10impl Direction {
11    #[cfg(feature = "cli")]
12    #[inline]
13    pub(crate) const fn from_top_down(top_down: bool) -> Self {
14        if top_down {
15            Direction::TopDown
16        } else {
17            Direction::BottomUp
18        }
19    }
20}