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    pub(crate) const fn from_top_down(top_down: bool) -> Self {
13        if top_down {
14            Direction::TopDown
15        } else {
16            Direction::BottomUp
17        }
18    }
19}