Returns an iterator of all the imports in this module, along with their module name, field name, and type that's being imported.
(&self)
| 492 | /// Returns an iterator of all the imports in this module, along with their |
| 493 | /// module name, field name, and type that's being imported. |
| 494 | pub fn imports(&self) -> impl ExactSizeIterator<Item = (&str, &str, EntityType)> { |
| 495 | let pool = &self.strings; |
| 496 | self.initializers.iter().map(move |i| match i { |
| 497 | Initializer::Import { name, field, index } => { |
| 498 | (&pool[name], &pool[field], self.type_of(*index)) |
| 499 | } |
| 500 | }) |
| 501 | } |
| 502 | |
| 503 | /// Get this module's `i`th import. |
| 504 | pub fn import(&self, i: usize) -> Option<(&str, &str, EntityType)> { |