Struct parallel_disk_usage::data_tree::DataTree [−][src]
pub struct DataTree<Name, Data: Size> { /* fields omitted */ }
Expand description
Disk usage data of a filesystem tree.
Construction: There are 3 main ways to create a DataTree:
- Use
FsTreeBuilderto create it from the real filesystem. - Use
TreeBuilderto create it from a representation of a filesystem. - Use
Reflection.
Visualization: Use the Visualizer struct to create an
ASCII chart that visualizes DataTree.
Serialization and deserialization: (feature: json) DataTree does not implement
Serialize and Deserialize traits directly, instead, it can be converted into/from a
Reflection which implements these traits.
Implementations
Create reflection.
Create a tree representation of a directory.
pub fn fixed_size_dir_constructor(
inode_size: Data
) -> impl Fn(Name, Vec<Self>) -> Self where
Data: Copy,
pub fn fixed_size_dir_constructor(
inode_size: Data
) -> impl Fn(Name, Vec<Self>) -> Self where
Data: Copy,
Create a directory constructor of fixed inode size.
Recursively cull all descendants that do not satisfy given predicate, in parallel.
Process the tree via par_retain method.
Recursively cull all descendants whose data are too small relative to root.
Trait Implementations
Create a DataTree from an FsTreeBuilder.
impl<Path, Name, Data, GetInfo, JoinPath> From<TreeBuilder<Path, Name, Data, GetInfo, JoinPath>> for DataTree<Name, Data> where
Path: Send + Sync,
Name: Send + Sync,
Data: Size + Send,
GetInfo: Fn(&Path) -> Info<Name, Data> + Copy + Send + Sync,
JoinPath: Fn(&Path, &Name) -> Path + Copy + Send + Sync,
impl<Path, Name, Data, GetInfo, JoinPath> From<TreeBuilder<Path, Name, Data, GetInfo, JoinPath>> for DataTree<Name, Data> where
Path: Send + Sync,
Name: Send + Sync,
Data: Size + Send,
GetInfo: Fn(&Path) -> Info<Name, Data> + Copy + Send + Sync,
JoinPath: Fn(&Path, &Name) -> Path + Copy + Send + Sync,
Create a DataTree from a TreeBuilder.
Auto Trait Implementations
impl<Name, Data> RefUnwindSafe for DataTree<Name, Data> where
Data: RefUnwindSafe,
Name: RefUnwindSafe,
impl<Name, Data> UnwindSafe for DataTree<Name, Data> where
Data: UnwindSafe,
Name: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Apply f to self. Read more
Apply f to &self. Read more
Apply f to &mut self. Read more
Apply f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read more
Apply f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read more
Apply f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Param>. Read more
Apply f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Param>. Read more
Apply f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Param>. Read more
Apply f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Param>. Read more