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
Create a DataTree
from an FsTreeBuilder
.
Auto Trait Implementations
impl<Data, GetData, Report> RefUnwindSafe for FsTreeBuilder<Data, GetData, Report> where
GetData: RefUnwindSafe,
Report: RefUnwindSafe,
impl<Data, GetData, Report> Send for FsTreeBuilder<Data, GetData, Report> where
GetData: Send,
Report: Send,
impl<Data, GetData, Report> Sync for FsTreeBuilder<Data, GetData, Report>
impl<Data, GetData, Report> Unpin for FsTreeBuilder<Data, GetData, Report> where
GetData: Unpin,
Report: Unpin,
impl<Data, GetData, Report> UnwindSafe for FsTreeBuilder<Data, GetData, Report> where
GetData: UnwindSafe,
Report: 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