Get this module's `i`th import.
(&self, i: usize)
| 502 | |
| 503 | /// Get this module's `i`th import. |
| 504 | pub fn import(&self, i: usize) -> Option<(&str, &str, EntityType)> { |
| 505 | match self.initializers.get(i)? { |
| 506 | Initializer::Import { name, field, index } => Some(( |
| 507 | &self.strings[name], |
| 508 | &self.strings[field], |
| 509 | self.type_of(*index), |
| 510 | )), |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | /// Returns the type of an item based on its index |
| 515 | pub fn type_of(&self, index: EntityIndex) -> EntityType { |
no test coverage detected