pub struct DirReader<'a, 'r> {
reader: &'a mut Reader<'r>,
prev_name: Vec<u8>,
}
Expand description
Fields§
§reader: &'a mut Reader<'r>
§prev_name: Vec<u8>
Previous directory entry name. We have to hang onto this to enforce name monotonicity.
Implementations§
source§impl<'a, 'r> DirReader<'a, 'r>
impl<'a, 'r> DirReader<'a, 'r>
fn new(reader: &'a mut Reader<'r>) -> Self
sourcepub async fn next(&mut self) -> Result<Option<Entry<'_, 'r>>>
pub async fn next(&mut self) -> Result<Option<Entry<'_, 'r>>>
Read the next Entry from the directory.
We explicitly don’t implement Iterator, since treating this as a regular Rust iterator will surely lead you astray.
- You must always consume the entire iterator, unless you abandon the entire archive reader.
- You must abandon the entire archive reader on the first error.
- You must abandon the directory reader upon the first None.
- Even if you know the amount of elements up front, you must keep reading until you encounter None.
Auto Trait Implementations§
impl<'a, 'r> Freeze for DirReader<'a, 'r>
impl<'a, 'r> !RefUnwindSafe for DirReader<'a, 'r>
impl<'a, 'r> Send for DirReader<'a, 'r>
impl<'a, 'r> !Sync for DirReader<'a, 'r>
impl<'a, 'r> Unpin for DirReader<'a, 'r>
impl<'a, 'r> !UnwindSafe for DirReader<'a, 'r>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more