Returns an iterator over all items defined in this `Linker`, in arbitrary order. The iterator returned will yield 3-tuples where the first two elements are the module name and item name for the external item, and the third item is the item itself that is defined. Note that multiple `Extern` items may be defined for the same module/name pair. # Panics This function will panic if the `store` pro
(
&'a self,
mut store: impl AsContextMut<Data = T> + 'p,
)
| 1252 | /// This function will panic if the `store` provided does not come from the |
| 1253 | /// same [`Engine`] that this linker was created with. |
| 1254 | pub fn iter<'a: 'p, 'p>( |
| 1255 | &'a self, |
| 1256 | mut store: impl AsContextMut<Data = T> + 'p, |
| 1257 | ) -> impl Iterator<Item = (&'a str, &'a str, Extern)> + 'p |
| 1258 | where |
| 1259 | T: 'static, |
| 1260 | { |
| 1261 | self.map.iter().map(move |(key, item)| { |
| 1262 | let store = store.as_context_mut(); |
| 1263 | ( |
| 1264 | &self.pool[key.module], |
| 1265 | &self.pool[key.name.unwrap()], |
| 1266 | // Should be safe since `T` is connecting the linker and store |
| 1267 | unsafe { item.to_extern(store.0).panic_on_oom() }, |
| 1268 | ) |
| 1269 | }) |
| 1270 | } |
| 1271 | |
| 1272 | /// Looks up a previously defined value in this [`Linker`], identified by |
| 1273 | /// the names provided. |