Get the `i`th field type. Returns `None` if `i` is out of bounds.
(&self, i: usize)
| 1969 | /// |
| 1970 | /// Returns `None` if `i` is out of bounds. |
| 1971 | pub fn field(&self, i: usize) -> Option<FieldType> { |
| 1972 | let engine = self.engine(); |
| 1973 | self.as_wasm_struct_type() |
| 1974 | .fields |
| 1975 | .get(i) |
| 1976 | .map(|ty| FieldType::from_wasm_field_type(engine, ty)) |
| 1977 | } |
| 1978 | |
| 1979 | /// Returns the list of field types for this function. |
| 1980 | #[inline] |