We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
enumerate
1 parent 37d68d0 commit 0382c4cCopy full SHA for 0382c4c
src/read/pe/data_directory.rs
@@ -35,6 +35,11 @@ impl<'data> DataDirectories<'data> {
35
self.entries.iter()
36
}
37
38
+ /// Iterator which gives the directories as well as their index (one of the IMAGE_DIRECTORY_ENTRY_* constants).
39
+ pub fn enumerate(&self) -> core::iter::Enumerate<slice::Iter<'data, pe::ImageDataDirectory>> {
40
+ self.entries.iter().enumerate()
41
+ }
42
+
43
/// Returns the data directory at the given index.
44
///
45
/// Index should be one of the `IMAGE_DIRECTORY_ENTRY_*` constants.
0 commit comments