[][src]Struct liboskar::walk_parallel::Walk

pub struct Walk {
    pub path: PathBuf,
    // some fields omitted
}

The 'Walk' struct contains all the information we need to traverse a directory.

Fields

path: PathBuf

Methods

impl Walk[src]

pub fn print_dir(w: &Walk, total: &Arc<AtomicUsize>)[src]

function to make output from a 'Walk', using one thread. It also takes an 'Arc' and will add the relevant directory sizes to it.

pub fn set_depth(&mut self, d: u8)[src]

set the maximum depth to display

pub fn set_regex(&mut self, r: Regex)[src]

set the regex for excludes

pub fn set_threshold(&mut self, n: u64)[src]

set the minumum file size

pub fn with_files(&mut self)[src]

include files when printing

pub fn blocks(&mut self)[src]

include files when printing

pub fn artifacts_only(&mut self)[src]

include files when printing

pub fn new(p: PathBuf, n: usize) -> Walk[src]

Create a new 'Walk' from a 'PathBuf' and the number of processor cores to be used.

pub fn push_subdir(
    w: &Walk,
    worker: &mut Worker<Status<Walk>>,
    total: &Arc<AtomicUsize>
)
[src]

This takes a 'Walk' and a 'Worker<Status>' and executes the walk in parallel, creating new work for each subdirectory. It's not the most efficient concurrency imaginable, but it's fast and easy-ish to use. It also takes in an 'Arc', which it updates with any file sizes in the directory.

Trait Implementations

impl Debug for Walk[src]

Auto Trait Implementations

impl !RefUnwindSafe for Walk

impl Send for Walk

impl Sync for Walk

impl Unpin for Walk

impl UnwindSafe for Walk

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.