pub struct ReadDir(_);
Reads the entries in a directory.
This struct is returned from the
read_dir function of this module and
will yield instances of
DirEntry. Through a
like the entry’s path and possibly other metadata can be learned.
ReadDir can be turned into a
This stream will return an
Err if there’s some sort of intermittent
IO error during iteration.
Returns the next entry in the directory stream.
This method is cancellation safe.
Polls for the next directory entry in the stream.
This method returns:
Poll::Pendingif the next directory entry is not yet available.
Poll::Ready(Ok(Some(entry)))if the next directory entry is available.
Poll::Ready(Ok(None))if there are no more directory entries in this stream.
Poll::Ready(Err(err))if an IO error occurred while reading the next directory entry.
When the method returns
Waker in the provided
Context is scheduled to receive a wakeup when the next directory entry
becomes available on the underlying IO resource.
Note that on multiple calls to
poll_next_entry, only the
Context passed to the most recent call is scheduled to receive a
Auto Trait Implementations§
Returns the argument unchanged.