Struct Walk

pub struct Walk { /* private fields */ }

Walk is a recursive directory iterator over file paths in one or more directories.

Only file and directory paths matching the rules are returned. By default, ignore files like .gitignore are respected. The precise matching rules and precedence is explained in the documentation for WalkBuilder.

Implementations

impl Walk

fn new<P: AsRef<Path>>(path: P) -> Walk

Creates a new recursive directory iterator for the file path given.

Note that this uses default settings, which include respecting .gitignore files. To configure the iterator, use WalkBuilder instead.

fn from_iter<P: AsRef<Path>, I: IntoIterator<Item = P>>(paths: I) -> Walk

Create a new recursive directory iterator from the sequence of paths given.

Note that if the provided iterator is empty, then Walk is guaranteed to yield zero entries.

Trait Implementations

impl FusedIterator for Walk

impl Iterator for Walk

type Item = Result<DirEntry, Error>;
fn next(&mut self) -> Option<Result<DirEntry, Error>>

Auto Trait Implementations

impl !RefUnwindSafe for Walk

impl !UnwindSafe for Walk

impl Freeze for Walk

impl Send for Walk

impl Sync for Walk

impl Unpin for Walk

impl UnsafeUnpin for Walk

Blanket Implementations

impl<I> IntoIterator for Walk where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<T> Any for Walk where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Walk where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Walk where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Walk

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for Walk

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into<U> for Walk where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for Walk where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Walk where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>