Returns the list of exports that this [`Module`] has and will be available after instantiation. This function will return the type of each item that will be returned from [`Instance::exports`](crate::Instance::exports). Each entry in this list corresponds 1-to-1 with that list, and the entries here will indicate the name of the export along with the type of the export. # Examples Modules might
(
&'module self,
)
| 817 | /// # } |
| 818 | /// ``` |
| 819 | pub fn exports<'module>( |
| 820 | &'module self, |
| 821 | ) -> impl ExactSizeIterator<Item = ExportType<'module>> + 'module { |
| 822 | let module = self.compiled_module().module(); |
| 823 | let types = self.types(); |
| 824 | let engine = self.engine(); |
| 825 | module.exports.iter().map(move |(name, entity_index)| { |
| 826 | ExportType::new( |
| 827 | &module.strings[name], |
| 828 | module.type_of(*entity_index), |
| 829 | types, |
| 830 | engine, |
| 831 | ) |
| 832 | }) |
| 833 | } |
| 834 | |
| 835 | /// Looks up an export in this [`Module`] by name. |
| 836 | /// |