Struct ReadDir

pub struct ReadDir(pub(in ::fs) ReadDir);

Iterator over the entries in a directory.

This iterator is returned from the read_dir function of this module and will yield instances of [io::Result]<[DirEntry]>. Through a DirEntry information like the entry's path and possibly other metadata can be learned.

The order in which this iterator returns entries is platform and filesystem dependent.

Errors

This io::Result will be an Err if an error occurred while fetching the next entry from the OS.

Fields

0: ReadDir

Trait Implementations

impl Debug for ReadDir

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Iterator for ReadDir

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

Auto Trait Implementations

impl Freeze for ReadDir

impl RefUnwindSafe for ReadDir

impl Send for ReadDir

impl Sync for ReadDir

impl Unpin for ReadDir

impl UnsafeUnpin for ReadDir

impl UnwindSafe for ReadDir

Blanket Implementations

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

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

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for ReadDir

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for ReadDir where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for ReadDir

impl<T, U> Into<U> for ReadDir 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 ReadDir where U: Into<T>,

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

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

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