pub struct DataTree<Name, Data: Size> { /* private fields */ }
Expand description

Disk usage data of a filesystem tree.

Construction: There are 3 main ways to create a DataTree:

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.

Create a tree representation of a file.

Create a directory constructor of fixed inode size.

Extract name

Get mutable reference to name.

Extract total disk usage

Extract children

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.

Sort all descendants recursively, in parallel.

Process the tree via par_sort_by method.

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Create a DataTree from an FsTreeBuilder.

Create a DataTree from a TreeBuilder.

This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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<Target = Param>. Read more
Apply f to &mut self where f takes a single parameter of type Param and Self implements trait [DerefMut<Target = Param>]. Read more
Apply f to &self where f takes a single parameter of type Param and Self implements trait Borrow<Param>. Read more
Apply f to &mut self where f takes a single parameter of type Param and Self implements trait BorrowMut<Param>. Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.