Struct parallel_disk_usage::fs_tree_builder::FsTreeBuilder[][src]

pub struct FsTreeBuilder<Data, GetData, Report> where
    Data: Size + Send + Sync,
    GetData: Fn(&Metadata) -> Data + Sync,
    Report: Reporter<Data> + Sync
{ pub root: PathBuf, pub get_data: GetData, pub reporter: Report, }
Expand description

Build a DataTree from a directory tree using From or Into.

Example:

use parallel_disk_usage::{
    data_tree::DataTree,
    os_string_display::OsStringDisplay,
    reporter::{ErrorOnlyReporter, ErrorReport},
    size::Bytes,
    size_getters::GET_APPARENT_SIZE,
};
let builder = FsTreeBuilder {
    root: std::env::current_dir().unwrap(),
    get_data: GET_APPARENT_SIZE,
    reporter: ErrorOnlyReporter::new(ErrorReport::SILENT),
};
let data_tree: DataTree<OsStringDisplay, Bytes> = builder.into();

Fields

root: PathBuf

Root of the directory tree.

get_data: GetData

Returns size of an item.

reporter: Report

Reports progress to external system.

Trait Implementations

Formats the value using the given formatter. Read more

Create a DataTree from an FsTreeBuilder.

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

Performs the conversion.

Performs the conversion.

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

Apply f to self. Read more

Apply f to &self. Read more

Apply f to &mut self. 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.