parallel_disk_usage/
data_tree.rs

1pub mod reflection;
2
3pub use reflection::Reflection;
4
5pub use Reflection as DataTreeReflection;
6
7use super::size;
8
9/// Disk usage data of a filesystem tree.
10///
11/// **Construction:** There are 3 main ways to create a `DataTree`:
12/// * Use [`FsTreeBuilder`](crate::fs_tree_builder::FsTreeBuilder) to create it from the real
13///   filesystem.
14/// * Use [`TreeBuilder`](crate::tree_builder::TreeBuilder) to create it from a representation
15///   of a filesystem.
16/// * Use [`Reflection`].
17///
18/// **Visualization:** Use the [`Visualizer`](crate::visualizer::Visualizer) struct to create an
19/// ASCII chart that visualizes `DataTree`.
20///
21/// **Serialization and deserialization:** _(feature: `json`)_ `DataTree` does not implement
22/// `Serialize` and `Deserialize` traits directly, instead, it can be converted into/from a
23/// [`Reflection`] which implements these traits.
24#[derive(Debug, PartialEq, Eq)]
25pub struct DataTree<Name, Size: size::Size> {
26    name: Name,
27    size: Size,
28    children: Vec<Self>,
29}
30
31mod constructors;
32mod getters;
33mod retain;
34mod sort;