[][src]Struct jwalk::ReadDirSpec

pub struct ReadDirSpec {
    pub path: PathBuf,
    pub depth: usize,
    pub state: Option<Box<dyn Any + Send + Sync>>,
}

Specification use to read a directory.

When a directory is read a new ReadDirSpec is created for each folder found in that directory. These specs are then sent to a work queue that is used to schedule future directory reads. Use max_depth and process_entries to change this default behavior.

Fields

path: PathBuf

The directory to read.

depth: usize

Depth of the directory to read relative to root of walk.

state: Option<Box<dyn Any + Send + Sync>>

Location where process_entries callback function can store walk state. This is a placeholder right now. One intended use case is to store .gitignore state to filter entries during the walk.

Methods

impl ReadDirSpec[src]

pub fn new<P: Into<PathBuf>>(
    path: P,
    depth: usize,
    state: Option<Box<dyn Any + Send + Sync>>
) -> ReadDirSpec
[src]

Trait Implementations

impl Debug for ReadDirSpec[src]

Auto Trait Implementations

impl Send for ReadDirSpec

impl Sync for ReadDirSpec

Blanket Implementations

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.

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

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

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